I use a screen trick but mostly useful when using commands modules.
Anyway, if it hangs doing apt upgrade, the behavior should be the same
if your run it as a command.
- debug: msg="Please, connect to {{ inventory_hostname }}, screen -r,
and respond the possible questions."
when: ansible_hostname == drbd_master.name
- name: Enable HA
*command: screen -dm -S halizard* bash -c 'ha-cfg status'
when: ansible_hostname == drbd_master.name
async: 60
poll: 60
It's also useful when you cannot avoid interactive mode on some actions,
but you miss the unattended possibilities.
Br,
Tony
On 22/07/14 23:41, Michael Palumbo wrote:
So there is no solution to avoid being stuck on the following? It
happens to me often when I am upgrading the system!
- name: upgrade all safe packages
sudo: yes
apt: upgrade=safe
Is there at least a way to see the progress? Looking at some logs on
the machine?
The state of my machine is messy when this task is stuck because I
have to stop ansible-playbook with CTRL+C and all the handlers are not
notified... :-/
Le vendredi 11 juillet 2014 17:30:35 UTC-5, Michael DeHaan a écrit :
apt should never need a parameter to not hang, however some
*specific* packages can sometimes be poorly coded.
Not saying that's the case here.
I'd first check your ansible version and then file a bug with
steps to reproduce.
On Thu, Jul 10, 2014 at 7:45 PM, Michael Palumbo
<michael....@gmail.com <javascript:>> wrote:
What is the parameter of the apt module to use to avoid that?
I run the following and it hangs...
- name: update APT package cache
sudo: yes
apt: update_cache=yes
- name: upgrade all safe packages
sudo: yes
apt: upgrade=safe
Thanks
--
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
<javascript:>.
To post to this group, send email to
ansible...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/d0595406-cff0-441d-98b3-a79b8f19b5de%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/d0595406-cff0-441d-98b3-a79b8f19b5de%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
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-project+unsubscr...@googlegroups.com
<mailto:ansible-project+unsubscr...@googlegroups.com>.
To post to this group, send email to ansible-project@googlegroups.com
<mailto:ansible-project@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e8099617-0b3f-4ba5-8698-235976cf7194%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/e8099617-0b3f-4ba5-8698-235976cf7194%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Email Signature | Swiss Mobility Solutions a Gemalto company
Swiss Mobility Solutions <http://www.swissmobilitysolutions.com/>
Tony Marin
DevOps Manager
Swiss Mobility Solutions
a Gemalto Company
Mobile+34 637402568 <tel:+34%20637402568>
Office Telephone+34 966370055 <tel:+34%20966370055>
Skypeantonymcs <skype:antonymcs?call>
LocationAv. Locutor Vicente Hipólito 39
03540 Alicante Spain
<https://maps.google.com/maps?q=Swiss+Mobility+Solutions+S.L,+Alicante,+Spain&hl=en&sll=37.0625,-95.677068&sspn=76.273886,78.837891&oq=swiss+mobility+so&hq=swiss+mobility+solutions+sl&hnear=Alicante,+Valencian+Community,+Spain&t=m&z=13>
Email <mailto:tony.ma...@gemalto.com> LinkedIn
<http://es.linkedin.com/in/antonymcs/> Website
<http://www.swissmobilitysolutions.com/>
--
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/53D0DB67.20109%40swissms.ch.
For more options, visit https://groups.google.com/d/optout.