diff --git a/meta/requirements.yml b/meta/requirements.yml deleted file mode 100644 index 2b3cea7..0000000 --- a/meta/requirements.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# meta file for update_motd -roles: - - name: ednxzu.manage_apt_packages diff --git a/tasks/main.yml b/tasks/main.yml index 6993979..2d61431 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,8 @@ --- # task/main file for update_motd +- name: "Import prerequisites.yml" + ansible.builtin.include_tasks: prerequisites.yml + - name: "Import install.yml" ansible.builtin.include_tasks: install.yml diff --git a/tasks/prerequisites.yml b/tasks/prerequisites.yml new file mode 100644 index 0000000..5467350 --- /dev/null +++ b/tasks/prerequisites.yml @@ -0,0 +1,9 @@ +--- +# task/prerequisites file for update_motd +- name: "Install required roles" + ansible.builtin.command: + cmd: "ansible-galaxy install {{ item }}" + loop: "{{ update_motd_prerequisites_roles }}" + changed_when: false + delegate_to: localhost + run_once: true diff --git a/vars/main.yml b/vars/main.yml index 9343984..62fe8c2 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,5 +1,7 @@ --- # vars file for update_motd +update_motd_prerequisites_roles: + - ednxzu.manage_apt_packages update_motd_path: "/etc/update-motd.d" update_motd_config_path: "/etc/profile.d" update_motd_packages: