Some of tasks I wrote start and never end. Ansible does not provide any errors or logs that would explain this, even with -vvvv option. Playbook just hangs and passing hours doesn't change anything.
When I try to run my tasks manually (by entering commands via SSH) everything is fine.
Example task that hangs:
- name: apt upgrade
shell: apt-get upgrade
Is there any way to see stdout and stderr ? I tried:
- name: apt upgrade
shell: apt-get upgrade
register: hello
- debug: msg="{{ hello.stdout }}"
- debug: msg="{{ hello.stderr }}"
but nothing changed.
I do have required permissions and I pass correct sudo password - other tasks that require sudo execute correctly.
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
you can execute shell commands, just not ones that expect interactivity as they hold the tty (this happens with any background ssh execution).for apt commands, yes use the apt module, it takes care of 99% f these issues.
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d0595406-cff0-441d-98b3-a79b8f19b5de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e8099617-0b3f-4ba5-8698-235976cf7194%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/mm99yAPVrfc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwFr%3DTTP8Kw6CR0Dph_SyTZbLVdX6GserpfodmZ%3Dnf%2BOw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALa-rByeCF-8-eO%2BKeLe%3DS75ZJ%3Dx%2B73nL1xT%2BQ7kri%3D%2BzWW7%2Bw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e8099617-0b3f-4ba5-8698-235976cf7194%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
DevOps Manager
Swiss Mobility
Solutions
a Gemalto Company
Av. Locutor Vicente
Hipólito 39
03540 Alicante Spain