Pass in a ref for the project_config repo

When running ansible we need to pass a specific version of
project-config through to puppet from ansible. Do this via the
project_config_ref fact that the puppet role in ansible understands.

Depends-On: Id99c3c2c20764ed4ba4259bd53f8067289374403
Change-Id: I88995c81c13080d913bac239a7635619cdc34441
This commit is contained in:
Clark Boylan 2015-02-09 16:55:48 -08:00 committed by Monty Taylor
parent 2b0a960ad3
commit 0441e7c7f0
1 changed files with 16 additions and 2 deletions

View File

@ -1,10 +1,24 @@
---
- hosts: localhost
gather_facts: false
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
- hosts: git0*
gather_facts: false
max_fail_percentage: 1
roles:
- { role: puppet, puppetmaster: puppetmaster.openstack.org }
- role: puppet
puppetmaster: puppetmaster.openstack.org
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"
- hosts: review.openstack.org
gather_facts: false
roles:
- { role: puppet, puppetmaster: puppetmaster.openstack.org }
- role: puppet
puppetmaster: puppetmaster.openstack.org
facts:
project_config_ref: "{{ hostvars.localhost.gitinfo.after }}"