feat: Buncha shit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
---
|
||||
- name: Stop containers
|
||||
# community.general.proxmox:
|
||||
# vmid: "{{ hostvars[item]['k3s_vmid'] }}"
|
||||
# api_user: root@pam
|
||||
# api_password: "{{ proxmox_api_password }}"
|
||||
# api_host: 10.0.2.2
|
||||
# state: stopped
|
||||
proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: "{{ proxmox_api_password }}"
|
||||
api_host: 10.0.2.2
|
||||
name: "{{ hostvars[item]['k3s_hostname'] }}"
|
||||
node: "{{ item }}"
|
||||
state: stopped
|
||||
timeout: 240
|
||||
loop: "{{ groups['k3s_hosts'] }}"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Remove containers
|
||||
# community.general.proxmox:
|
||||
# vmid: "{{ hostvars[item]['k3s_vmid'] }}"
|
||||
# api_user: root@pam
|
||||
# api_password: "{{ proxmox_api_password }}"
|
||||
# api_host: "{{ hostvars[item]['ip_addr'] }}"
|
||||
# state: absent
|
||||
proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: "{{ proxmox_api_password }}"
|
||||
api_host: 10.0.2.2
|
||||
name: "{{ hostvars[item]['k3s_hostname'] }}"
|
||||
node: "{{ item }}"
|
||||
state: absent
|
||||
timeout: 90
|
||||
loop: "{{ groups['k3s_hosts'] }}"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Remove .ssh/known_hosts lines
|
||||
ansible.builtin.lineinfile:
|
||||
path: /Users/lino.silva/.ssh/known_hosts
|
||||
state: absent
|
||||
# regexp: '^{{ hostvars[item]["k3s_lxc_host"] }}'
|
||||
regexp: '^{{ hostvars[item]["k3s_vm_host"] }}'
|
||||
loop: "{{ groups['k3s_hosts'] }}"
|
||||
Reference in New Issue
Block a user