Remove debugging;Sanitize hypervisor username;Traefik /data volume permission fix #2;Specify kubeconfig x3
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -1,3 +1,27 @@
|
||||
- block:
|
||||
|
||||
- name: Generate vCenter API token
|
||||
ansible.builtin.uri:
|
||||
url: https://{{ vapp['hv.fqdn'] }}/api/session
|
||||
method: POST
|
||||
headers:
|
||||
Authorization: Basic {{ ( vapp['hv.username'] ~ ':' ~ vapp['hv.password'] ) | b64encode }}
|
||||
register: vcenterapi_token
|
||||
|
||||
- name: Retrieve vCenter API session details
|
||||
ansible.builtin.uri:
|
||||
url: https://{{ vapp['hv.fqdn'] }}/api/session
|
||||
method: GET
|
||||
headers:
|
||||
vmware-api-session-id: "{{ vcenter_api_token.json }}"
|
||||
register: vcenter_session
|
||||
|
||||
module_defaults:
|
||||
ansible.builtin.uri:
|
||||
validate_certs: no
|
||||
status_code: [200, 201]
|
||||
body_format: json
|
||||
|
||||
- name: Configure clusterctl
|
||||
ansible.builtin.template:
|
||||
src: clusterctl.j2
|
||||
@ -12,7 +36,7 @@
|
||||
hv:
|
||||
fqdn: "{{ vapp['hv.fqdn'] }}"
|
||||
tlsthumbprint: "{{ tls_thumbprint.stdout }}"
|
||||
username: "{{ vapp['hv.username'] }}"
|
||||
username: "{{ vcenter_session.json.user }}"
|
||||
password: "{{ vapp['hv.password'] }}"
|
||||
datacenter: "{{ vcenter_info.datacenter }}"
|
||||
datastore: "{{ vcenter_info.datastore }}"
|
||||
|
Reference in New Issue
Block a user