Refactor to use pre-run instead
Change-Id: I9ef70c76871a609dbb675800230aec8eee5674ad
This commit is contained in:
parent
bb72fc57d6
commit
3d4eb769b1
4
playbooks/vexxhost-tox-molecule/pre-run.yaml
Normal file
4
playbooks/vexxhost-tox-molecule/pre-run.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- ensure-clouds-yaml
|
13
roles/ensure-clouds-yaml/tasks/main.yml
Normal file
13
roles/ensure-clouds-yaml/tasks/main.yml
Normal 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"
|
12
roles/ensure-clouds-yaml/templates/clouds.yaml.j2
Normal file
12
roles/ensure-clouds-yaml/templates/clouds.yaml.j2
Normal 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"
|
@ -1,16 +1,24 @@
|
|||||||
---
|
---
|
||||||
- job:
|
- job:
|
||||||
name: ansible-collection-atmosphere-tox-molecule
|
name: vexxhost-tox-molecule
|
||||||
parent: tox
|
parent: tox
|
||||||
allowed-projects:
|
allowed-projects:
|
||||||
- vexxhost/ansible-collection-atmosphere
|
- vexxhost/ansible-collection-atmosphere
|
||||||
|
pre-run:
|
||||||
|
- playbooks/vexxhost-tox-molecule/pre-run.yaml
|
||||||
secrets:
|
secrets:
|
||||||
- name: tox_environment
|
- name: openstack_credentials
|
||||||
secret: vexxhost-openstack
|
secret: vexxhost-openstack
|
||||||
|
pass-to-parent: true
|
||||||
vars:
|
vars:
|
||||||
tox_environment:
|
tox_environment:
|
||||||
|
OS_CLOUD: default
|
||||||
STACK_NAME: "{{ zuul.build }}"
|
STACK_NAME: "{{ zuul.build }}"
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: ansible-collection-atmosphere-tox-molecule
|
||||||
|
parent: vexxhost-tox-molecule
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: vexxhost-build-docker-image
|
name: vexxhost-build-docker-image
|
||||||
parent: opendev-build-docker-image
|
parent: opendev-build-docker-image
|
||||||
|
Loading…
Reference in New Issue
Block a user