diff --git a/nextcloud/check_stack_nextcloud.yml b/nextcloud/check_stack_nextcloud.yml index 29b1c0a..ecf8647 100644 --- a/nextcloud/check_stack_nextcloud.yml +++ b/nextcloud/check_stack_nextcloud.yml @@ -8,6 +8,7 @@ become_method: sudo vars: + vm_password: "{{ lookup('ansible.builtin.env', 'vm_pass') }}" vm_use_sudo: "{{ use_sudo | default(false) | bool }}" vm_commands: @@ -41,11 +42,10 @@ - vm_ip | string | trim | length > 0 - vm_user is defined - vm_user | string | trim | length > 0 - - vm_pass is defined - - vm_pass | string | length > 0 + - vm_password | length > 0 fail_msg: >- Missing vm_ip, vm_user or vm_pass. - Configure them in the attached Semaphore Variable Group. + Check the attached Semaphore Variable Group. quiet: true no_log: true @@ -81,13 +81,14 @@ ('bash -lc ' ~ (item | quote)) }} environment: - SSHPASS: "{{ vm_pass }}" + SSHPASS: "{{ vm_password }}" loop: "{{ vm_commands }}" loop_control: label: "{{ item }}" register: vm_cmds changed_when: false failed_when: false + no_log: true - name: Show outputs for each command ansible.builtin.debug: