diff --git a/playbooks/zuul/run-base.yaml b/playbooks/zuul/run-base.yaml index 76dc5dc182..18a45100d1 100644 --- a/playbooks/zuul/run-base.yaml +++ b/playbooks/zuul/run-base.yaml @@ -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 diff --git a/playbooks/zuul/templates/host_vars/bridge.openstack.org.yaml.j2 b/playbooks/zuul/templates/host_vars/bridge.openstack.org.yaml.j2 index e9dabe00ec..18c272ec5c 100644 --- a/playbooks/zuul/templates/host_vars/bridge.openstack.org.yaml.j2 +++ b/playbooks/zuul/templates/host_vars/bridge.openstack.org.yaml.j2 @@ -66,3 +66,4 @@ gitea_kube_key: Z2l0ZWFfazhzX2tleQ== ansible_cron_disable_job: true cloud_launcher_disable_job: true +extra_users: []