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:
parent
9302ef3b8c
commit
0e9d830a64
16
.zuul.yaml
16
.zuul.yaml
@ -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
|
||||
|
12
playbooks/zuul/run-production-playbook.yaml
Normal file
12
playbooks/zuul/run-production-playbook.yaml
Normal 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 }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user