Rancher is working, including Vaultwarden password
This commit is contained in:
parent
08f36a74f8
commit
ce228aad70
|
@ -10,7 +10,7 @@
|
|||
- name: Verify Rancher hostname
|
||||
delegate_to: "{{ kubectl_host }}"
|
||||
ansible.builtin.set_fact:
|
||||
_dig_rancher_hostname: "{{ lookup('community.general.dig', '{{ rancher_hostname }}.', '@1.1.1.1')}}"
|
||||
_dig_rancher_hostname: "{{ lookup('community.general.dig', '{{ rancher_hostname }}.', '@1.1.1.1') }}"
|
||||
|
||||
- name: "Verify Rancher hostname resolves: {{ rancher_hostname }}"
|
||||
ansible.builtin.assert:
|
||||
|
@ -53,7 +53,7 @@
|
|||
{{ lookup('community.general.bitwarden', '{{ _bitwarden_password_item_name }}', field='password') }}
|
||||
|
||||
- name: "Get password from Bitwarden"
|
||||
when: "{{ _rancher_password_item | length }}"
|
||||
when: "_rancher_password_item | length"
|
||||
ansible.builtin.set_fact:
|
||||
_rancher_password: "{{ _rancher_password_item[0] }}"
|
||||
|
||||
|
@ -104,6 +104,7 @@
|
|||
delegate_to: localhost
|
||||
ansible.builtin.command:
|
||||
cmd: "bw create item {{ _bitwarden_password_item | ansible.builtin.to_json | ansible.builtin.b64encode }}"
|
||||
changed_when: true
|
||||
|
||||
- name: Rancher login
|
||||
delegate_to: "{{ kubectl_host }}"
|
||||
|
@ -151,9 +152,6 @@
|
|||
status_code: [201]
|
||||
register: _rancher_login
|
||||
|
||||
- ansible.builtin.debug:
|
||||
var: _rancher_login
|
||||
|
||||
- name: Rancher logout
|
||||
delegate_to: "{{ kubectl_host }}"
|
||||
ansible.builtin.uri:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
|
||||
- name: Directory for configs
|
||||
delegate_to: "{{ talosctl_host }}"
|
||||
become: false
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
roles:
|
||||
- role: metallb
|
||||
- role: traefik
|
||||
- role: cert-manager
|
||||
- role: cert_manager
|
||||
- role: rancher
|
||||
|
|
Loading…
Reference in New Issue