Refactor to use pre-run instead

Change-Id: I9ef70c76871a609dbb675800230aec8eee5674ad
This commit is contained in:
Mohammed Naser 2022-03-11 19:04:54 -05:00
parent bb72fc57d6
commit 3d4eb769b1
4 changed files with 39 additions and 2 deletions

View File

@ -0,0 +1,4 @@
---
- hosts: all
roles:
- ensure-clouds-yaml

View File

@ -0,0 +1,13 @@
---
- name: Create folder for "clouds.yaml" file
file:
path: "{{ item }}"
state: directory
loop:
- "{{ ansible_env.HOME }}/.config"
- "{{ ansible_env.HOME }}/.config/openstack"
- name: Generate "clouds.yaml" file
template:
src: clouds.yaml.j2
dest: "{{ ansible_env.HOME }}/.config/openstack/clouds.yaml"

View File

@ -0,0 +1,12 @@
---
clouds:
default:
auth:
auth_url: "{{ openstack_credentials.OS_AUTH_URL }}"
project_name: "{{ openstack_credentials.OS_PROJECT_NAME }}"
username: "{{ openstack_credentials.OS_USERNAME }}"
password: "{{ openstack_credentials.OS_PASSWORD }}"
user_domain_name: "{{ openstack_credentials.OS_USER_DOMAIN_NAME }}"
project_domain_name: "{{ openstack_credentials.OS_PROJECT_DOMAIN_NAME }}"
region_name: "{{ openstack_credentials.OS_REGION_NAME }}"
identity_api_version: "3"

View File

@ -1,16 +1,24 @@
---
- job:
name: ansible-collection-atmosphere-tox-molecule
name: vexxhost-tox-molecule
parent: tox
allowed-projects:
- vexxhost/ansible-collection-atmosphere
pre-run:
- playbooks/vexxhost-tox-molecule/pre-run.yaml
secrets:
- name: tox_environment
- name: openstack_credentials
secret: vexxhost-openstack
pass-to-parent: true
vars:
tox_environment:
OS_CLOUD: default
STACK_NAME: "{{ zuul.build }}"
- job:
name: ansible-collection-atmosphere-tox-molecule
parent: vexxhost-tox-molecule
- job:
name: vexxhost-build-docker-image
parent: opendev-build-docker-image