aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/linux_status
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-08-04 11:20:03 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-08-04 11:20:03 +0200
commitc182c4dc6694ee6e7f49cfa91f5d02ea306c072d (patch)
tree82a8889418a1d64312db4e76080dd14014ff70f0 /roles/linux_status
parentinitial commit (diff)
downloadinfra-ansible-c182c4dc6694ee6e7f49cfa91f5d02ea306c072d.tar.gz
infra-ansible-c182c4dc6694ee6e7f49cfa91f5d02ea306c072d.zip
import some common roles
Diffstat (limited to '')
-rw-r--r--roles/linux_status/defaults/main.yml2
-rw-r--r--roles/linux_status/tasks/main.yml25
2 files changed, 27 insertions, 0 deletions
diff --git a/roles/linux_status/defaults/main.yml b/roles/linux_status/defaults/main.yml
new file mode 100644
index 0000000..da596ae
--- /dev/null
+++ b/roles/linux_status/defaults/main.yml
@@ -0,0 +1,2 @@
+keys_dir: /etc/apt/keyrings
+gpg_key_id: ecb69cbafc6d7cd8bd67ec35b1089b3051c9384d
diff --git a/roles/linux_status/tasks/main.yml b/roles/linux_status/tasks/main.yml
new file mode 100644
index 0000000..766f009
--- /dev/null
+++ b/roles/linux_status/tasks/main.yml
@@ -0,0 +1,25 @@
+- name: Set up repository
+ become: true
+ block:
+ - name: Create keys directory
+ ansible.builtin.file:
+ path: '{{ keys_dir }}'
+ mode: '755'
+ state: directory
+
+ - name: Add key
+ ansible.builtin.get_url:
+ url: 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{ gpg_key_id }}'
+ dest: '{{ keys_dir }}/linux-status.asc'
+ mode: '644'
+
+ - name: Add repository
+ ansible.builtin.apt_repository:
+ repo: 'deb [signed-by={{ keys_dir }}/linux-status.asc] https://ppa.launchpadcontent.net/egor-tensin/linux-status/ubuntu focal main'
+ filename: linux-status
+
+- name: Install linux-status
+ become: true
+ ansible.builtin.apt:
+ install_recommends: false
+ name: linux-status