From 815355bc83a9a779505bf3eef47055333698efaa Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 2 Aug 2018 16:10:47 -0500 Subject: [PATCH] Rename update_puppet to update-system-config The purpose of the playbook is to update the system-config checkout, as well as installing puppet modules and ansible roles. Rename it, so that it's clearer what it does. Also, clean it up a bit. We've gotten better at playbooks since we originally wrote this. Change-Id: I793914ca3fc7f89cf019cf4cdf52acb7e0c93e60 --- playbooks/update-system-config.yaml | 21 +++++++++++++++++++++ playbooks/update_puppet.yaml | 15 --------------- run_all.sh | 2 +- 3 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 playbooks/update-system-config.yaml delete mode 100644 playbooks/update_puppet.yaml diff --git a/playbooks/update-system-config.yaml b/playbooks/update-system-config.yaml new file mode 100644 index 0000000000..a0729b36be --- /dev/null +++ b/playbooks/update-system-config.yaml @@ -0,0 +1,21 @@ +--- +- hosts: "localhost:!disabled" + connection: local + gather_facts: false + tasks: + + - name: Make sure system-config repo is up to date + git: + repo: https://git.openstack.org/openstack-infra/system-config + dest: /opt/system-config/production + force: yes + + - name: Clone puppet modules to /etc/puppet/modules + command: ./install_modules.sh + args: + chdir: /opt/system-config/production + + - name: Install ansible roles to /etc/ansible/roles + command: ansible-galaxy install --force -r roles.yaml + args: + chdir: /opt/system-config/production diff --git a/playbooks/update_puppet.yaml b/playbooks/update_puppet.yaml deleted file mode 100644 index e026d1239b..0000000000 --- a/playbooks/update_puppet.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- hosts: "localhost:!disabled" - connection: local - gather_facts: false - tasks: - - git: - repo: https://git.openstack.org/openstack-infra/system-config - dest: /opt/system-config/production - force: yes - - shell: ./install_modules.sh - args: - chdir: /opt/system-config/production - - shell: ansible-galaxy install --force -r roles.yaml - args: - chdir: /opt/system-config/production diff --git a/run_all.sh b/run_all.sh index fed06832cd..e4fca81774 100755 --- a/run_all.sh +++ b/run_all.sh @@ -31,7 +31,7 @@ set +e # stuck if they are oomkilled # First, sync the puppet repos with all the machines -timeout -k 2m 120m ansible-playbook -f 10 ${ANSIBLE_PLAYBOOKS}/update_puppet.yaml +timeout -k 2m 120m ansible-playbook -f 10 ${ANSIBLE_PLAYBOOKS}/update-system-config.yaml # Update the puppet version timeout -k 2m 120m ansible-playbook -f 10 ${ANSIBLE_PLAYBOOKS}/update_puppet_version.yaml # Run the git/gerrit/zuul sequence, since it's important that they all work together