From aae3bc1251668170aa48b3730f99c42d372d19c4 Mon Sep 17 00:00:00 2001 From: Sachin Prabhu Date: Thu, 18 Feb 2021 00:08:56 +0000 Subject: Add distro specific actions for hosts.update Signed-off-by: Sachin Prabhu --- vagrant/hosts.update.yml | 9 ++++----- vagrant/roles/hosts.update/tasks/centos7.yml | 5 +++++ vagrant/roles/hosts.update/tasks/main.yml | 3 +++ 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 vagrant/roles/hosts.update/tasks/centos7.yml create mode 100644 vagrant/roles/hosts.update/tasks/main.yml diff --git a/vagrant/hosts.update.yml b/vagrant/hosts.update.yml index cf569d3..c6b7577 100644 --- a/vagrant/hosts.update.yml +++ b/vagrant/hosts.update.yml @@ -4,8 +4,7 @@ - hosts: all become: yes become_method: sudo - tasks: - - name: Perform a complete update - yum: - name: '*' - state: latest + vars_files: + - ansible/distro-vars.yml + roles: + - hosts.update diff --git a/vagrant/roles/hosts.update/tasks/centos7.yml b/vagrant/roles/hosts.update/tasks/centos7.yml new file mode 100644 index 0000000..0e9ed93 --- /dev/null +++ b/vagrant/roles/hosts.update/tasks/centos7.yml @@ -0,0 +1,5 @@ +- name: Perform a complete update + yum: + name: '*' + state: latest + diff --git a/vagrant/roles/hosts.update/tasks/main.yml b/vagrant/roles/hosts.update/tasks/main.yml new file mode 100644 index 0000000..16a7d3b --- /dev/null +++ b/vagrant/roles/hosts.update/tasks/main.yml @@ -0,0 +1,3 @@ +- name: Run distro specific tasks for host.update + include_tasks: + file: "{{ distro.actions_file }}" -- cgit