Override bridge hostvars directly
Now that we're not using playbook adjacent hostvars, just set overrides in the test hostvars. Change-Id: I4598c61dbe28eb965fce9a4578ddf44d785c5ff1
This commit is contained in:
parent
83ced7f6e6
commit
6b89b0b5a7
@ -81,29 +81,6 @@
|
|||||||
- host_vars/backup-test02.opendev.org.yaml
|
- host_vars/backup-test02.opendev.org.yaml
|
||||||
- name: Display group membership
|
- name: Display group membership
|
||||||
command: ansible localhost -m debug -a 'var=groups'
|
command: ansible localhost -m debug -a 'var=groups'
|
||||||
|
|
||||||
# In prod, bridge installs a zuul user, but in zuul we already have a zuul user, so we really need
|
|
||||||
# to not modify it.
|
|
||||||
# TODO(mordred) We should be able to replace this with overriding directly.
|
|
||||||
- name: Load bridge hostvars
|
|
||||||
slurp:
|
|
||||||
path: /home/zuul/src/opendev.org/opendev/system-config/inventory/service/host_vars/bridge.openstack.org.yaml
|
|
||||||
register: bridge_hostvar_content
|
|
||||||
- name: Parse bridge_hostvars
|
|
||||||
set_fact:
|
|
||||||
bridge_hostvars: "{{ bridge_hostvar_content.content | b64decode | from_yaml }}"
|
|
||||||
- name: Overwrite extra_users
|
|
||||||
vars:
|
|
||||||
new_config:
|
|
||||||
extra_users: []
|
|
||||||
set_fact:
|
|
||||||
bridge_hostvars: "{{ bridge_hostvars | combine(new_config) }}"
|
|
||||||
- name: Save bridge hostvars
|
|
||||||
copy:
|
|
||||||
content: "{{ bridge_hostvars | to_nice_yaml }}"
|
|
||||||
dest: /home/zuul/src/opendev.org/opendev/system-config/inventory/service/host_vars/bridge.openstack.org.yaml
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Run base.yaml
|
- name: Run base.yaml
|
||||||
command: ansible-playbook -f 50 -v /home/zuul/src/opendev.org/opendev/system-config/playbooks/base.yaml
|
command: ansible-playbook -f 50 -v /home/zuul/src/opendev.org/opendev/system-config/playbooks/base.yaml
|
||||||
- name: Run bridge service playbook
|
- name: Run bridge service playbook
|
||||||
@ -122,9 +99,11 @@
|
|||||||
zuul_job: '{{ zuul.job }}'
|
zuul_job: '{{ zuul.job }}'
|
||||||
zuul: '{{ zuul }}'
|
zuul: '{{ zuul }}'
|
||||||
|
|
||||||
|
# The default of '' here is to satisfy ansible-lint, which
|
||||||
|
# otherwise throws a j2 formatting exception.
|
||||||
- name: Write out testinfra extra data fixture
|
- name: Write out testinfra extra data fixture
|
||||||
copy:
|
copy:
|
||||||
content: '{{ testinfra_extra_data | to_nice_yaml }}'
|
content: "{{ testinfra_extra_data | default('') | to_nice_yaml }}"
|
||||||
dest: '/home/zuul/testinfra_extra_data_fixture.yaml'
|
dest: '/home/zuul/testinfra_extra_data_fixture.yaml'
|
||||||
|
|
||||||
- name: Run testinfra to validate configuration
|
- name: Run testinfra to validate configuration
|
||||||
|
@ -66,3 +66,4 @@ gitea_kube_key: Z2l0ZWFfazhzX2tleQ==
|
|||||||
|
|
||||||
ansible_cron_disable_job: true
|
ansible_cron_disable_job: true
|
||||||
cloud_launcher_disable_job: true
|
cloud_launcher_disable_job: true
|
||||||
|
extra_users: []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user