system-config/playbooks/remote_puppet_git.yaml
Jeremy Stanley 52b592b1d1 Use zuul-scheduler group instead of zuul* glob
Since Ansible host inventory globs match against both host names and
host groups, use the zuul-scheduler group when referring to
zuul01.openstack.org and similarly-named hosts so as to avoid
inadvertently matching all members of the "zuul" host group with
zuul* (which includes the executors and mergers). Continue to match
zuulv3.openstack.org separately for now as it's not in the
zuul-scheduler group (and soon to be deleted anyway).

Change-Id: I3127d121ea344e1eb37c700d37f873e34edbb86e
2018-01-19 22:51:56 +00:00

41 lines
1.1 KiB
YAML

---
- hosts: "localhost:!disabled"
strategy: free
gather_facts: true
connection: local
tasks:
# Note that git module does ls-remote if clone is set to no and places
# the remote_head value in returndict.after
- git: repo=https://git.openstack.org/openstack-infra/project-config clone=no
register: gitinfo
roles:
- role: puppet
copy_hieradata: False
copy_puppet: False
- hosts: "git0*:!disabled"
strategy: free
gather_facts: true
max_fail_percentage: 1
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
- hosts: "review.openstack.org:!disabled"
strategy: free
gather_facts: true
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
vars:
puppet_timeout: 60m
- hosts: "zuulv3.openstack.org:zuul-scheduler:!disabled"
strategy: free
gather_facts: true
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
vars:
puppet_timeout: 60m