docs: Add granular Proxmox API token permissions to README and fix inventory file paths in LXC playbooks.
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
|
||||
- name: Add new host to local hosts.ini file (persistency)
|
||||
ansible.builtin.blockinfile:
|
||||
path: "{{ inventory_dir }}/hosts.ini"
|
||||
path: "{{ playbook_dir }}/../inventory/hosts.ini"
|
||||
block: |
|
||||
{{ container_name }} ansible_host={{ container_ip_cidr | split('/') | first }} ansible_user=root
|
||||
insertafter: "^\\[new\\]"
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
tasks:
|
||||
- name: Remove host from the [new] group
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ inventory_dir }}/hosts.ini"
|
||||
path: "{{ playbook_dir }}/../inventory/hosts.ini"
|
||||
regexp: "^{{ item }}\\s" # Match the start of the line with the hostname
|
||||
state: absent
|
||||
loop: "{{ groups['new'] }}" # Loop over all hosts in the 'new' group
|
||||
|
||||
Reference in New Issue
Block a user