Merge "Add backwards-compat playbook for /etc/nodepool/provider"

This commit is contained in:
Zuul 2017-10-01 05:54:57 +00:00 committed by Gerrit Code Review
commit 68fc33716a
3 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,2 @@
This playbook writes a backwards compatible /etc/nodepool/provider file for
legacy jobs running on Zuul v3 which no longer provides that file.

View File

@ -0,0 +1,19 @@
- name: Configure /etc/nodepool/provider for backwards compatibility
hosts: all
gather_facts: no
tasks:
- name: Warn that /etc/nodepool/provider is deprecated
debug:
msg: |
The /etc/nodepool/provider file no longer exists and is being created
for backwards compatibility purposes. The variables provided by this
file are now available through Ansible under hostvars['nodepool'].
- name: Create /etc/nodepool/provider file
copy:
content: |
NODEPOOL_PROVIDER={{ hostvars['nodepool']['provider'] }}
NODEPOOL_CLOUD={{ hostvars['nodepool']['cloud'] }}
NODEPOOL_REGION={{ hostvars['nodepool']['region'] }}
NODEPOOL_AZ={{ hostvars['nodepool']['az'] }}
dest: /etc/nodepool/provider

View File

@ -8656,6 +8656,7 @@
description: | description: |
Base job template for TripleO jobs that leverage devstack-gate/dsvm Base job template for TripleO jobs that leverage devstack-gate/dsvm
parent: legacy-publish-openstack-artifacts parent: legacy-publish-openstack-artifacts
pre-run: playbooks/legacy/nodepool-provider/pre
required-projects: required-projects:
- openstack/aodh - openstack/aodh
- openstack/barbican - openstack/barbican