diff --git a/roles/proxmox_lxc/README.md b/roles/proxmox_lxc/README.md index a46bec5..9cfa857 100644 --- a/roles/proxmox_lxc/README.md +++ b/roles/proxmox_lxc/README.md @@ -56,6 +56,11 @@ individually, like in the example playbook. ### Optional + proxmox_lxc_no_log: true + +By default, nothing will be logged during LXC creation. Sometimes, you might +need the logs for debugging though. Set this to `false` then. + proxmox_lxc_containers_present: [] proxmox_lxc_containers_absent: [] diff --git a/roles/proxmox_lxc/defaults/main.yml b/roles/proxmox_lxc/defaults/main.yml index 5fdea0c..fe3b005 100644 --- a/roles/proxmox_lxc/defaults/main.yml +++ b/roles/proxmox_lxc/defaults/main.yml @@ -3,6 +3,8 @@ # proxmox_lxc_api_user: # proxmox_lxc_api_password: +proxmox_lxc_no_log: true + proxmox_lxc_api_node: "{{ proxmox_lxc_api_host }}" proxmox_lxc_containers_present: [] diff --git a/roles/proxmox_lxc/tasks/main.yml b/roles/proxmox_lxc/tasks/main.yml index e951311..dd19e8a 100644 --- a/roles/proxmox_lxc/tasks/main.yml +++ b/roles/proxmox_lxc/tasks/main.yml @@ -2,7 +2,7 @@ - name: Create LXC containers ansible.builtin.include_tasks: create_lxc.yml loop: "{{ proxmox_lxc_containers_present }}" - no_log: true # Prevents leaking the password, cf. #3 + no_log: "{{ proxmox_lxc_no_log }}" # Prevents leaking the password, cf. #3 - name: Delete LXC containers ansible.builtin.include_tasks: delete_lxc.yml