summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Prabhu <sprabhu@redhat.com>2020-03-31 15:36:31 +0100
committerMichael Adam <obnox@samba.org>2020-04-07 16:04:36 +0200
commit8c756f44ef1fbcafdc31ab79b820bdd190862a98 (patch)
tree15d9cb7dde9c955026099b5cbccb1c76d24c5342
parent5c81b20eb09993699896da1283c41c1c589f5fd8 (diff)
Update all nodes before starting the install process
Present the setup scripts with completely updated hosts. Updating in parallel will also speed up the install process. Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
-rw-r--r--vagrant/Makefile8
-rw-r--r--vagrant/hosts.update.yml11
2 files changed, 16 insertions, 3 deletions
diff --git a/vagrant/Makefile b/vagrant/Makefile
index 921b67e..c2d8315 100644
--- a/vagrant/Makefile
+++ b/vagrant/Makefile
@@ -3,10 +3,13 @@ INVENTORY := ./vagrant_ansible_inventory
local:
@ansible-playbook --inventory localhost, local.yml
+hosts.update.only:
+ @ansible-playbook --inventory=$(INVENTORY) hosts.update.yml
+
setup.prep.only:
@ansible-playbook --inventory=$(INVENTORY) setup.prep.yml
-setup.prep: local setup.prep.only
+setup.prep: local hosts.update.only setup.prep.only
setup.prep.copy:
@ansible-playbook --inventory=$(INVENTORY) --start-at-task "copy ansible playbooks to setup machine" setup.prep.yml
@@ -19,5 +22,4 @@ setup.cluster.only:
setup.cluster: setup.prep setup.test.only setup.cluster.only
-
-.PHONY: local setup.prep.only setup.prep setup.test.only setup.cluster.only setup.cluster
+.PHONY: local hosts.update.only setup.prep.only setup.prep setup.test.only setup.cluster.only setup.cluster
diff --git a/vagrant/hosts.update.yml b/vagrant/hosts.update.yml
new file mode 100644
index 0000000..cf569d3
--- /dev/null
+++ b/vagrant/hosts.update.yml
@@ -0,0 +1,11 @@
+#
+# Update all nodes
+#
+- hosts: all
+ become: yes
+ become_method: sudo
+ tasks:
+ - name: Perform a complete update
+ yum:
+ name: '*'
+ state: latest