-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate_sandbox.yml
31 lines (28 loc) · 1.06 KB
/
create_sandbox.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- name: Create an RHPDS Sandbox
hosts: localhost
vars:
- controller_hostname: "{{ lookup('env', 'CONTROLLER_HOST') }}"
- controller_oauthtoken: "{{ lookup('env', 'CONTROLLER_OAUTHTOKEN') }}"
collections:
- ansible.controller
- redhat_cop.controller_configuration
pre_tasks:
- name: Include vars from vars directory
ansible.builtin.include_vars:
file: "{{ playbook_dir }}/vars/base.yml"
roles:
- { role: check_vars }
- { role: rhpds, when: cfme_url is defined }
tasks:
- name: Add AWS RHPDS Credential to controller
ansible.controller.credential:
name: "{{ credential_name }}"
description: RHPDS AWS Token
organization: "{{ controller_org }}"
credential_type: Amazon Web Services
inputs:
username: "{{ aws_access_key | default('access') }}"
password: "{{ aws_access_secret | default('secret') }}"
controller_oauthtoken: "{{ controller_oauthtoken | default(omit, true) }}"
controller_host: "{{ controller_hostname }}"
when: update_credentials