Skip to content

Commit

Permalink
do not display server password in log
Browse files Browse the repository at this point in the history
Signed-off-by: Yanan Shen <yanans@vmware.com>
  • Loading branch information
123lzxm committed Dec 25, 2023
1 parent 47f0456 commit f0ea216
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/add_host_in_memory_inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@
ansible_ssh_pipelining: "{{ add_host_in_memory_inventory_ssh_pipeline | default(false) }}"
ansible_remote_tmp: "{{ add_host_in_memory_inventory_remote_tmp | default(omit) }}"
ansible_shell_executable: "{{ add_host_in_memory_inventory_shell | default(omit) }}"

register: add_host_result
no_log: "{{ no_need_log | default(true) }}"

- name: Display the add host result
ansible.builtin.debug: var=add_host_result
when: enable_debug is defined and enable_debug
no_log: "{{ no_need_log | default(true) }}"
2 changes: 2 additions & 0 deletions common/set_vmware_module_hostname.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- vcenter_username is defined and vcenter_username
- vcenter_password is defined and vcenter_password
- datacenter is defined and datacenter
no_log: "{{ no_need_log | default(true) }}"

- name: "Set ESXi hostname for Ansible VMware modules to connect"
ansible.builtin.set_fact:
Expand All @@ -25,6 +26,7 @@
vsphere_host_user_password: "{{ esxi_password }}"
vsphere_host_datacenter: "ha-datacenter"
when: vcenter_is_defined is undefined
no_log: "{{ no_need_log | default(true) }}"

- name: "Set default VM folder when it's undefined"
ansible.builtin.set_fact:
Expand Down
1 change: 1 addition & 0 deletions main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Main playbook for launching guest OS validation testing on vSphere
- name: main
hosts: localhost
gather_facts: "{{ no_need_log | default(true) }}"
tasks:
- name: "Read variables from vars file"
ansible.builtin.include_vars:
Expand Down

0 comments on commit f0ea216

Please sign in to comment.