On Thu, Aug 13, 2020 at 11:35 PM
nage...@gmail.com <
nage...@gmail.com> wrote:
>
> Hi just modify the file, getting below error
>
> role task :
>
> name: SDDC Health
> command: sudo /opt/vmware/sddc-support/sos --health-check
> register: find_output
> - debug:
> var: find_output
> ~
>
> Playbook:
>
>
> ---
> - name: sddc_health
> hosts: sddc_mgr
> become: yes
> become_user: root
> become_method: su
> roles:
> - role: sddc_health
>
Hello, remove become_method: su, and leave the default value, which is
sudo. This will call your command with sudo
If you want to specify a different password for sudo, use the
variable: ansible_become_password.
docs here:
https://docs.ansible.com/ansible/latest/user_guide/become.html
Luca
--
"E' assurdo impiegare gli uomini di intelligenza eccellente per fare
calcoli che potrebbero essere affidati a chiunque se si usassero delle
macchine"
Gottfried Wilhelm von Leibnitz, Filosofo e Matematico (1646-1716)
"Internet è la più grande biblioteca del mondo.
Ma il problema è che i libri sono tutti sparsi sul pavimento"
John Allen Paulos, Matematico (1945-vivente)
Luca 'remix_tj' Lorenzetto,
http://www.remixtj.net , <
lorenze...@gmail.com>