Hello
I'm trying to run a playbook that will login as user ansible and then sudo
to root to make configurations. I have a sudo entry that will allow root
without password. The playbook looks like this:
---
- hosts: 10.53.153.32
remote_user: ansible
become: yes
become_user: root
tasks:
- name: create zabbix group
action: group name=zabbix gid=1400
- name: create zabbix user
action: user name=zabbix uid=1400 group=zabbix comment="Zabbix
Monitoring User" home="/u01/home/zabbix"
My output is gets this:
[ansible@devansible01 playbooks]$ ansible-playbook dave_test.yml
PLAY [10.53.153.32]
***********************************************************
GATHERING FACTS
***************************************************************
fatal: [10.53.153.32] => Missing become password
TASK: [create zabbix group]
***************************************************
FATAL: no hosts matched or all hosts have already failed -- aborting
PLAY RECAP
********************************************************************
to retry, use: --limit @/home/ansible/dave_test.retry
10.53.153.32 : ok=0 changed=0 unreachable=1 failed=0
I can connect to target vm and correctly sudo. Could someone please point
out my error?
Thanks! Dave
--
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/362fc7b5-d021-4ad8-8e97-7b14a9c10fd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.