From f1b9b864f7ac5c4886be685eb82ff12ef0f3d734 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 28 Nov 2015 14:58:20 -0500 Subject: [PATCH] Translate the rest of run_all.sh to ansible There are a few things that are run as part of run_all.sh that are not logged into puppet_run_all.log - namely git cloning, module installation and ansible role installation. Let's go ahead and do those in a playbook so that we can see their output while we're watching the log file. Change-Id: I6982452f1e572b7bc5a7b7d167c1ccc159c94e66 --- playbooks/update_puppet.yaml | 14 ++++++++++++++ run_all.sh | 9 --------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/playbooks/update_puppet.yaml b/playbooks/update_puppet.yaml index d74a64b28b..f00f02b3e0 100644 --- a/playbooks/update_puppet.yaml +++ b/playbooks/update_puppet.yaml @@ -1,4 +1,18 @@ --- +- 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 - hosts: '!puppetmaster.openstack.org:!disabled' gather_facts: false tasks: diff --git a/run_all.sh b/run_all.sh index d9c74273c2..8482d93e23 100755 --- a/run_all.sh +++ b/run_all.sh @@ -22,15 +22,6 @@ export ANSIBLE_LOG_PATH=/var/log/puppet_run_all.log SYSTEM_CONFIG=/opt/system-config/production ANSIBLE_PLAYBOOKS=$SYSTEM_CONFIG/playbooks -cd $SYSTEM_CONFIG -git fetch -a && git reset -q --hard @{u} -./install_modules.sh -ansible-galaxy install --force -r roles.yaml - -# One must touch manifests/site.pp to trick puppet into re-loading modules -# some times -touch manifests/site.pp - # It's possible for connectivity to a server or manifest application to break # for indeterminate periods of time, so the playbooks should be run without # errexit