Merge "Override bridge hostvars directly"

This commit is contained in:
Zuul 2020-06-04 22:33:39 +00:00 committed by Gerrit Code Review
commit a0615fa63d
2 changed files with 4 additions and 24 deletions

View File

@ -81,29 +81,6 @@
- host_vars/backup-test02.opendev.org.yaml
- name: Display group membership
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
command: ansible-playbook -f 50 -v /home/zuul/src/opendev.org/opendev/system-config/playbooks/base.yaml
- name: Run bridge service playbook
@ -122,9 +99,11 @@
zuul_job: '{{ zuul.job }}'
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
copy:
content: '{{ testinfra_extra_data | to_nice_yaml }}'
content: "{{ testinfra_extra_data | default('') | to_nice_yaml }}"
dest: '/home/zuul/testinfra_extra_data_fixture.yaml'
- name: Run testinfra to validate configuration

View File

@ -66,3 +66,4 @@ gitea_kube_key: Z2l0ZWFfazhzX2tleQ==
ansible_cron_disable_job: true
cloud_launcher_disable_job: true
extra_users: []