From 4fef4eaa087f157fc80828a9c3338a96a3f9c4e2 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sun, 1 May 2022 13:38:44 -0400 Subject: [PATCH] add update hosts play; add test nodes to inventory --- inventory/hosts | 13 ++++++++++--- tasks/long_running_tasks.yml | 3 --- update-hosts.yml | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 update-hosts.yml diff --git a/inventory/hosts b/inventory/hosts index 178f3b5..4ee84e9 100644 --- a/inventory/hosts +++ b/inventory/hosts @@ -1,18 +1,25 @@ [dev] lab-dev-1 lab-dev-2 +lab-dev-3 [dev:vars] ansible_python_interpreter=/usr/bin/python2 -[uat] -lab-uat-1 -lab-uat-2 +[test] +lab-test-1 +lab-test-2 +lab-test-3 + +[test:vars] +ansible_python_interpreter=/usr/bin/python3 + [prod] lab-prod-1 lab-prod-2 +lab-prod-3 [prod:vars] ansible_python_interpreter=/usr/bin/python3 diff --git a/tasks/long_running_tasks.yml b/tasks/long_running_tasks.yml index ab0cab0..3b409a9 100644 --- a/tasks/long_running_tasks.yml +++ b/tasks/long_running_tasks.yml @@ -34,7 +34,4 @@ include_tasks: tasks/long_running_tasks.yml - - - ... diff --git a/update-hosts.yml b/update-hosts.yml new file mode 100644 index 0000000..109463e --- /dev/null +++ b/update-hosts.yml @@ -0,0 +1,15 @@ +--- +- name: Update all hosts + hosts: all + gather_facts: no + become: yes + + + tasks: + - name: Update all hosts + package: name=* state=latest + async: 1800 + poll : 3 + + +...