aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/ppa
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-08-15 21:53:57 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-08-15 21:53:57 +0200
commitf7072ebace2099ef69ac2b41e613e3ef505b3cd8 (patch)
treef478d7abe9b9978948ecbb98b36b29574c2f27e0 /roles/ppa
parentfactor out apt repository setup to apt_repo (diff)
downloadinfra-ansible-f7072ebace2099ef69ac2b41e613e3ef505b3cd8.tar.gz
infra-ansible-f7072ebace2099ef69ac2b41e613e3ef505b3cd8.zip
apt_ppa -> ppa
Diffstat (limited to 'roles/ppa')
-rw-r--r--roles/ppa/README.md3
-rw-r--r--roles/ppa/tasks/main.yml8
2 files changed, 11 insertions, 0 deletions
diff --git a/roles/ppa/README.md b/roles/ppa/README.md
new file mode 100644
index 0000000..f7ce92c
--- /dev/null
+++ b/roles/ppa/README.md
@@ -0,0 +1,3 @@
+This role is used to enable an Ubuntu PPA repository; can be used on Debian as
+well. It downloads the repository key and adds the repository in
+/etc/apt/sources.list.d.
diff --git a/roles/ppa/tasks/main.yml b/roles/ppa/tasks/main.yml
new file mode 100644
index 0000000..01d6809
--- /dev/null
+++ b/roles/ppa/tasks/main.yml
@@ -0,0 +1,8 @@
+- name: Set up PPA repository
+ ansible.builtin.include_role:
+ name: apt_repo
+ vars:
+ apt_repo_name: '{{ ppa_name }}'
+ apt_repo_key_url: 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{ ppa_key }}'
+ apt_repo_url: 'https://ppa.launchpadcontent.net/{{ ppa_owner }}/{{ ppa_name }}/ubuntu'
+ apt_repo_distro: '{{ ppa_distro }}'