Not sure how can I specifically remove this -n 

Below is my code/error/other info if you can help, please 

Code : -
---
- hosts: dpie_prod
  user: dpiesa
  become: yes
  become_method: enable
  tasks:
  - name: install telnet
    yum: pkg=telnet state=present update_cache=true

ERROR: 

fatal: [lind01]: FAILED! => {"changed": false, "msg": "You need to be root 
to perform this command.\n", "rc": 1, "results": ["Loaded plugins: 
fastestmirror, package_upload, product-id, search-disabled-\n              
: repos, security, subscription-manager\n"]}

But I can run this successfully manually on a server like this without 
password 
#dpiesa@lind01:/home/dpiesa> sudo yum install telnet

Also can become root like this

dpiesa@lind01:/home/dpiesa> become
root@lind01:/root>



On Monday, May 21, 2018 at 10:35:10 PM UTC-5, Brian Coca wrote:
>
> You seem to have a non standard/old sudo, change the default 
> become_flags as they seem to be causing the problem, specifically, 
> remove -n (default: '-H -S -n' 
> ) 
>
> -- 
> ---------- 
> Brian Coca 
>

-- 
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/f6dd1c80-7dfb-4090-a3f6-2cfda49f56c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to