Re: [ansible-project] Need help to find how to run root command with non-root user and escalated privilages

2018-05-22 Thread 'Kallu Srikanth' via Ansible Project
Brian, Actually it worked instead of removing -n i added "default: '-H -S" at the end of the file Thank you very much, I really appreciate it 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

Re: [ansible-project] Need help to find how to run root command with non-root user and escalated privilages

2018-05-22 Thread abhay srivastava
Are you able to do sudo without password On Tue 22 May, 2018, 10:05 PM 'Kallu Srikanth' via Ansible Project, < ansible-project@googlegroups.com> wrote: > > Hi Abhay i still have the error > > Code : - > --- > - hosts: dpie_prod > user: dpiesa > become: true > become_method: enable >

Re: [ansible-project] Need help to find how to run root command with non-root user and escalated privilages

2018-05-22 Thread 'Kallu Srikanth' via Ansible Project
Hi Abhay i still have the error Code : - --- - hosts: dpie_prod user: dpiesa become: true become_method: enable tasks: - name: install telnet yum: pkg=telnet state=present update_cache=true ERROR: fatal: [lind01]: FAILED! => {"changed": false, "module_stderr": "Shared

Re: [ansible-project] Need help to find how to run root command with non-root user and escalated privilages

2018-05-22 Thread 'Kallu Srikanth' via Ansible Project
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:

Re: [ansible-project] Need help to find how to run root command with non-root user and escalated privilages

2018-05-21 Thread abhay srivastava
Try: - hosts: dpie_prod user: dpiesa become: True tasks: - name: install telnet yum: pkg=telnet state=installed update_cache=true #command: sudo yum install telnet -y On Sat, May 19, 2018 at 12:56 AM, 'Kallu Srikanth' via Ansible Project < ansible-project@googlegroups.com>

Re: [ansible-project] Need help to find how to run root command with non-root user and escalated privilages

2018-05-21 Thread David Villasmil
I think if you set 'become' then you don't need to use sudo. Also, why don't you use the module to install packages instead of executing yum? http://docs.ansible.com/ansible/latest/modules/yum_module.html Example: - name: install one specific version of Apache yum: name:

Re: [ansible-project] Need help to find how to run root command with non-root user and escalated privilages

2018-05-21 Thread Brian Coca
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