Skip to content

Commit

Permalink
feat: make no_log configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
bellackn committed Apr 10, 2024
1 parent 4e2ecbe commit 640e35d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions roles/proxmox_lxc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: []

Expand Down
2 changes: 2 additions & 0 deletions roles/proxmox_lxc/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Expand Down
2 changes: 1 addition & 1 deletion roles/proxmox_lxc/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 640e35d

Please sign in to comment.