system-config/playbooks/remote_puppet_git.yaml
Colleen Murphy 5dd32fc501 Simplify group_names variable
As noted in [1] the group_names variable is a top-level variable and
doesn't need to be accessed via the hostvars object.

[1] https://review.openstack.org/#/c/572861/1/playbooks/remote_puppet_adhoc.yaml

Change-Id: Ic895f177019b31da34cdf91a6dd62dc99a649754
2018-06-20 23:53:26 +02:00

51 lines
1.5 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
manage_config: True
puppet_reports: none
futureparser: "{{ True if 'futureparser' in group_names else False }}"
- hosts: "git0*:!disabled"
strategy: free
gather_facts: true
max_fail_percentage: 1
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
manage_config: True
puppet_reports: none
futureparser: "{{ True if 'futureparser' in group_names else False }}"
- hosts: "review:!disabled"
strategy: free
gather_facts: true
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
puppet_timeout: 60m
manage_config: True
puppet_reports: none
futureparser: "{{ True if 'futureparser' in group_names else False }}"
- hosts: "zuul-scheduler:!disabled"
strategy: free
gather_facts: true
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
puppet_timeout: 60m
manage_config: True
puppet_reports: none
futureparser: "{{ True if 'futureparser' in group_names else False }}"