try this instead:
ansible -a "systemctl status docker" -i hosts -u user --ask-pass -K --become
Adding (--become) makes ansible responsible for executing sudo (default
become method) and passing in a password if needed (-K prompts you ahead of
time for the sudo password)
--
--
Brian Co
All,
I am trying to extract data from a table on confluence page. Is there a
way to convert this to json or something easily parsible?
Thanks,
Ox
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop
Hello,
Yes, I have a clue: check your sudo configuration.
Very likely your sudo is set up in a way it is requiring an TTY for
command executions. When Ansible sends a command it uses ssh, which usually
does not provide a TTY.
Alex
On Thu, Feb 10, 2022 at 12:31 PM Tony Wong wrote:
> I am trying
I am trying to run remote commands on few servers
ansible -a "df -h" myservers -i hosts -u "user" --assk-pass
this works
but when i do
ansible -a "sudo systemctl status docker" -i hosts -u "user --ask-pass
then i enter my password
it just hangs
any idea?
--
You received this message becau
On 10/02/2022 16:15, SysAdmin EM wrote:
I changed source by "." inside the shell script and it’s still not running.
#!/bin/bash
. config-dev.cfg
. functions.sh
Within the playbook I am already using the parameter "executable: /bin/bash".
That's true, but you again calling the shell again wit
I changed source by "." inside the shell script and it’s still not running.
#!/bin/bash
. config-dev.cfg
. functions.sh
Within the playbook I am already using the parameter "executable:
/bin/bash".
Playbook
---
- name: Test SH
hosts: schedule-dev
become: yes
gather_facts: no
tasks:
On 10/02/2022 14:48, SysAdmin EM wrote:
Hello,
I’m trying to run a playbook which executes a shell script in a remote instance.
Playbook
---
- name: Test SH
hosts: schedule-dev
become: yes
gather_facts: no
tasks:
- name: Test Shell Ansible
shell: |
sh create_part
Hello,
I’m trying to run a playbook which executes a shell script in a remote
instance.
Playbook
---
- name: Test SH
hosts: schedule-dev
become: yes
gather_facts: no
tasks:
- name: Test Shell Ansible
shell: |
sh create_partition_db.sh {{ carrier }}
args:
chd
OK that should work.
What is the exact command that you use to run the playbook?
What are the outputs of:
which ansible
which ansible-playbook
/opt/venv/venv_ansible29/bin/pip list
As a side note, I see you're using the 2.9.0 version, which is the very
first release of that minor version.
For in