Ansible-Protecting-Paswords

27 views
Skip to first unread message

Bairava Surya

unread,
Oct 29, 2018, 10:40:49 AM10/29/18
to Ansible Project
Hi All,

---

- name: Weblogic Server control
  hosts: "servername"


  tasks:
  - name: Ansible Id
    shell: 
      cmd: |
        echo "{{ ansible_password }}" | /usr/local/bin/sudo -S su - sudousername
        echo "{{ ansible_password }}" | /usr/local/bin/sudo -S su - sudousername << EOF
        id
        EOF
    register: shell_out
    

  - debug:
      var: shell_out
    
When i execute above playbook ansible it prints password in debug output.Can anyone tell me any other approach to avoid printing passwords other than no_logs option.

Mike Klebolt

unread,
Oct 30, 2018, 4:24:10 PM10/30/18
to Ansible Project
Reply all
Reply to author
Forward
0 new messages