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
This commit is contained in:
Monty Taylor 2015-11-28 14:58:20 -05:00
parent e777d234a7
commit f1b9b864f7
2 changed files with 14 additions and 9 deletions

View File

@ -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:

View File

@ -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