diff --git a/roles/os_config/handlers/main.yml b/roles/os_config/handlers/main.yml new file mode 100644 index 0000000..7fac077 --- /dev/null +++ b/roles/os_config/handlers/main.yml @@ -0,0 +1,7 @@ +# vim: ft=yaml.ansible +--- +- name: Install apt-update-push + shell: + cmd: "echo 'topic={{ secrets.ntfy_topic }}' > .env && ./install.sh" + stdin: 20 + chdir: "/home/{{ ansible_user }}/apt-update-push" diff --git a/roles/os_config/tasks/base.yml b/roles/os_config/tasks/base.yml index 83b39b8..75b55ec 100644 --- a/roles/os_config/tasks/base.yml +++ b/roles/os_config/tasks/base.yml @@ -42,3 +42,14 @@ (force_reboot is defined and force_reboot) tags: - reboot + +- name: Clone apt-update-push + git: + dest: "/home/{{ ansible_user }}/apt-update-push" + repo: https://github.com/samsapti/apt-update-push.git + clone: true + update: true + single_branch: true + depth: 1 + become: false + notify: Install apt-update-push diff --git a/roles/os_config/tasks/disks.yml b/roles/os_config/tasks/disks.yml index 14e0f7d..ba9094e 100644 --- a/roles/os_config/tasks/disks.yml +++ b/roles/os_config/tasks/disks.yml @@ -14,7 +14,7 @@ name: "{{ ssd_name }}" - name: Get list of mounted devices - shell: mount + command: mount register: mounted_devices - name: Create filesystems if they do not exist diff --git a/roles/os_config/tasks/main.yml b/roles/os_config/tasks/main.yml index 260f21d..f1b1bc3 100644 --- a/roles/os_config/tasks/main.yml +++ b/roles/os_config/tasks/main.yml @@ -3,9 +3,6 @@ - name: Configure system base import_tasks: base.yml -- name: Configure updates - import_tasks: updates.yml - - name: Configure firewall import_tasks: firewall.yml diff --git a/roles/os_config/tasks/updates.yml b/roles/os_config/tasks/updates.yml deleted file mode 100644 index f5ab7f6..0000000 --- a/roles/os_config/tasks/updates.yml +++ /dev/null @@ -1,19 +0,0 @@ -# vim: ft=yaml.ansible ---- -- name: Clone apt-update-push - git: - dest: "/home/{{ ansible_user }}/apt-update-push" - repo: https://github.com/samsapti/apt-update-push.git - clone: true - update: true - single_branch: true - depth: 1 - become: false - register: clone - -- name: Install apt-update-push - shell: - cmd: "echo 'topic={{ secrets.ntfy_topic }}' > .env && ./install.sh" - stdin: 20 - chdir: "/home/{{ ansible_user }}/apt-update-push" - when: clone.changed