Re: [ansible-project] ansible -a sudo command hangs

2022-02-10 Thread Brian Coca
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

[ansible-project] Extracting data from a table in confluence

2022-02-10 Thread olyx11
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

Re: [ansible-project] ansible -a sudo command hangs

2022-02-10 Thread Alex Wanderley
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

[ansible-project] ansible -a sudo command hangs

2022-02-10 Thread Tony Wong
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

Re: [ansible-project] Ansible execute remote shell script with source to other files

2022-02-10 Thread Stefan Hornburg (Racke)
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

Re: [ansible-project] Ansible execute remote shell script with source to other files

2022-02-10 Thread SysAdmin EM
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:

Re: [ansible-project] Ansible execute remote shell script with source to other files

2022-02-10 Thread Stefan Hornburg (Racke)
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

[ansible-project] Ansible execute remote shell script with source to other files

2022-02-10 Thread SysAdmin EM
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:

Re: [ansible-project] dateutil required for this module

2022-02-10 Thread Dick Visser
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