system-config/playbooks/remote_puppet_git.yaml
Colleen Murphy 9ce4a353e6 Add support for turning on the future parser
If a host is a member of the 'futureparser' group, pass the
'futureparser' option to the puppet role, which will turn on parser =
future in puppet.conf when manage_config is true and when the node isn't
already using puppet 4. Nodes can be added one at a time by adding them
to modules/openstack_project/files/puppetmaster/groups.txt.

Depends-On: https://review.openstack.org/572856
Change-Id: I54e19ef6164658da8e0e5bff72a1964b88b81242
2018-06-06 20:23:43 +02:00

51 lines
1.6 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 hostvars[inventory_hostname].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 hostvars[inventory_hostname].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 hostvars[inventory_hostname].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 hostvars[inventory_hostname].group_names else False }}"