Add job to run playbook on bridge.o.o

This new job is a parent job allowing us to CD from Zuul via
bridge.openstack.org. Using Zuul project ssh keys we add_host bridge.o.o
to our running inventory on the executor then run ansible on bridge.o.o
to run an ansible playbook in
bridge.openstack.org:/opt/system-config/playbooks.

Change-Id: I5cd2dcc53ac480459a22d9e19ef38af78a9e90f7
This commit is contained in:
Clark Boylan 2018-09-12 10:17:59 -07:00 committed by James E. Blair
parent 9302ef3b8c
commit 0e9d830a64
2 changed files with 27 additions and 1 deletions

View File

@ -195,6 +195,20 @@
- playbooks/templates/clouds/
- testinfra/test_nodepool.py
- job:
name: system-config-run-production-playbook
description: |
Run specified playbook against productions hosts.
This is a parent job designed to be inherited to enabled
CD deployment of our infrastructure. Set playbook_name to
specify the playbook relative to
bridge.openstack.org:/opt/system-config/playbooks
abstract: true
run: playbooks/zuul/run-production-playbook.yaml
vars:
ansible_forks: 5
- project:
templates:
- system-config-zuul-role-integration
@ -222,4 +236,4 @@
- puppet-beaker-rspec-puppet-4-centos-7-infra-system-config
- system-config-run-base
- system-config-run-eavesdrop
- system-config-run-nodepool
- system-config-run-nodepool

View File

@ -0,0 +1,12 @@
- hosts: localhost
tasks:
- name: Add bridge.o.o to inventory
add_host:
name: bridge.openstack.org
ansible_user: root
- hosts: bridge.openstack.org
tasks:
- name: Run specified playbook on bridge.o.o
command: ansible-playbook -f {{ ansible_forks }} /opt/system-config/playbooks/{{ playbook_name }}