Help to understand execution order

63 views
Skip to first unread message

Serega Sheypak

unread,
Apr 24, 2015, 11:13:19 AM4/24/15
to ansible...@googlegroups.com
Hi, i'm confused with execution order.

Here is a problem:

TASK: [common | installing oracle java] *************************************** 
failed: [ec2-52-17-199-200.eu-west-1.compute.amazonaws.com] => {"changed": true, "cmd": "DEBIAN_FRONTEND=noninteractive apt-get -y install oracle-java7-installer oracle-java7-set-default", "delta": "0:00:03.892655", "end": "2015-04-24 14:35:48.676917", "rc": 100, "start": "2015-04-24 14:35:44.784262"}
stderr: invoke-rc.d: initscript spark-worker, action "start" failed.
dpkg: error processing package spark-worker (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 spark-worker
E: Sub-process /usr/bin/dpkg returned an error code (1)

I don't understand why task:

- name: installing oracle java
  shell: DEBIAN_FRONTEND=noninteractive apt-get -y install oracle-java7-installer oracle-java7-set-default

triggers:
stderr: invoke-rc.d: initscript spark-worker, action "start" failed.

how can I get the idea why it happens?

" installing oracle java" belongs to role common and spark-worker stuff is in other role executed after common role

Brian Coca

unread,
Apr 24, 2015, 11:38:42 AM4/24/15
to ansible...@googlegroups.com
This is not an execution order issue, its a dpkg issue. Oracle's
packages will prompt even when non interactive and dpkg allows for
this ignoring your non interactive request. Use the debconf module to
answer preemptively, i would also suggest using the apt module instead
of calling apt from shell. I created a role that does this you can use
(directly or as a guide) https://galaxy.ansible.com/list#/roles/628.
> --
> 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/3310a68f-a192-47c0-bf57-29e7737c795f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca

Serega Sheypak

unread,
Apr 24, 2015, 11:57:03 AM4/24/15
to ansible...@googlegroups.com
Thank you, 
replaced my bicycle with yours role, It works!


--
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/G84khLtAuQo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.

To post to this group, send email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages