system-config/playbooks/remote_puppet_git.yaml
Monty Taylor e836fb7af6 Remember that lookups are local
Go ahead and actually clone project-config on bridge, because
we're going to read the projects.yaml file with a lookup. Because
it's a local action, not a remote action.

Change-Id: I77454bcb10b797ce5b48018caef7fecb31947b97
2019-03-01 21:55:18 +00:00

49 lines
1.3 KiB
YAML

- hosts: "localhost:!disabled"
name: "Puppet-git: Collect the project-config ref"
strategy: free
connection: local
tasks:
- name: Grab project-config repo info
git:
repo: https://git.openstack.org/openstack-infra/project-config
dest: /opt/project-config
force: yes
register: gitinfo
- hosts: "git-server:!disabled"
name: "Puppet-git: Run puppet on the git servers"
strategy: free
max_fail_percentage: 1
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
- hosts: "gitea:!disabled"
name: "Create repos on gitea servers"
strategy: free
max_fail_percentage: 1
roles:
- role: gitea-git-repos
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
- hosts: "review:!disabled"
name: "Puppet-git: Run puppet on the Gerrit server"
strategy: free
gather_facts: true
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
puppet_timeout: 60m
- hosts: "zuul-scheduler:!disabled"
name: "Puppet-git: Run puppet on the Zuul scheduler"
strategy: free
gather_facts: true
roles:
- role: puppet
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
puppet_timeout: 60m