After going from 1.7.1 to 1.9.1 I'm getting "ssh connection closed waiting
for a privilege escalation password prompt" errors. I tried switching to
using the new become directives, but I'm still having problems.
Here's the simplest test case I've come up with:
*test.yml:*
---
- hosts: my.server.org
become: yes
vars:
- user: testuser
tasks:
- command: /usr/bin/whoami
register: foo
become_user: "{{ user }}"
- debug: msg="whoami = {{ foo.stdout }}"
- name: copy file
copy: src=foo.txt dest=/home/{{ user }}/test.txt
become_user: "{{ user }}"
*hosts.ini:*
[ubuntu]
my.server.org
*group_vars/ubuntu.yml:*
---
ansible_ssh_user: admin
ansible_become_pass: xxxxxxxx
*And the output:*
PLAY [my.server.org] ***********************************************
GATHERING FACTS
***************************************************************
ok: [my.server.org]
TASK: [command /usr/bin/whoami]
***********************************************
changed: [my.server.org]
TASK: [debug msg="whoami = {{ foo.stdout }}"]
*********************************
ok: [my.server.org] => {
"msg": "whoami = testuser"
}
TASK: [copy file]
*************************************************************
fatal: [my.server.org] => ssh connection closed waiting for a privilege
escalation password prompt
FATAL: all hosts have already failed -- aborting
Where am I going wrong? Any help would be greatly appreciated.
Thanks,
-Mark
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/c0614931-0e71-480b-a4a6-9e6cd0ba43e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.