Hello there,
I'm using the win_dns_record module in tower 3.8.3 in Openshift, but it doesn't seem to have an option to put the credentials to be used, or at least not documented.
The only way to fill in the required "ansible_user" and "ansible_password" credentials is explicitly in the "extra variables" section, with its no convenient against security concerns.
if I try to use the facts:
- set_fact:
ansible_user: "{{ user }}"
ansible_password: "{{ password }}"
- debug:
msg: "Ansible user set by fact is {{ ansible_user }}"
- name: Create A record
community.windows.win_dns_record:
name: "{{ vm_name|upper }}"
type: "A"
value: "{{ vm_ip }}"
zone: "{{ selected_zone }}"
the values are actually not considered by the playbook:
TASK [Gathering Facts] *********************************************************
task path: /tmp/bwrap_1535_6eo1vcx_/awx_1535_5bwcwf0t/project/windows_management_playbooks/automate.yaml:1
Using module file /usr/lib/python2.7/site-packages/ansible/modules/windows/setup.ps1
Pipelining is enabled.
<dc.masked.com> ESTABLISH WINRM CONNECTION FOR USER: root on PORT 5985 TO dc.masked.com
fatal: [dc.masked.com]: UNREACHABLE! => {
"changed": false,
"msg": "plaintext: auth method plaintext requires a password",
"unreachable": true
}
Is there a better was to pass the credentials (perhaps from within the playbook, and not as an extra variable) so we can encrypt them?
Thanks in advance,
Elio