-
Notifications
You must be signed in to change notification settings - Fork 2
/
rhpds_ocp_login.yaml
executable file
·35 lines (33 loc) · 1.08 KB
/
rhpds_ocp_login.yaml
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
32
33
34
35
#!/usr/bin/env ansible-playbook
---
- name: "RHPDS: OpenShift Login"
hosts: localhost
connection: local
gather_facts: False
vars_files:
- configuration.yaml
- credentials.yaml
vars:
cloudforms_api_url: "{{ rhpds_api_url }}"
pre_tasks:
- name: "Parameter: username"
fail: msg="username is not defined or is empty"
when: username is not defined or username is none
tags: [ always ]
- name: "Parameter: password"
fail: msg="password is not defined or is empty"
when: password is not defined or password is none
tags: [ always ]
roles:
- role: cloudforms_login
- role: cloudforms_check_existing_service
- role: cloudforms_fetch_custom_attributes_rhpds
- name: Logging into an existing OpenShift Cluster
hosts: personal_hosts
gather_facts: False
vars:
openshift_user: "{{ hostvars['localhost']['openshift_user'] }}"
openshift_password: "{{ hostvars['localhost']['openshift_password'] }}"
openshift_api: "{{ hostvars['localhost']['openshift_api'] }}"
roles:
- role: ocp_login