How to move fresh Debian to systemd with Ansible?

208 views
Skip to first unread message

anatoly techtonik

unread,
Apr 8, 2014, 3:26:06 PM4/8/14
to ansible...@googlegroups.com
Hi,

apt-get once again too demanding. Trying to move to systemd is
presented with a warning that you can not escape from command
line:

$ apt-get install -y -qq --force-yes systemd-sysv
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?]

This becomes a problem with Ansible and it hangs forever. Is there
a way to get past this message and still do the changes?

Maciej Delmanowski

unread,
Apr 8, 2014, 3:27:43 PM4/8/14
to ansible...@googlegroups.com
Maybe this will work?

- shell: yes "Yes, do as I say!" | apt-get -y -qq --force-yes apt-get install systemd-sysv


--
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/5b4a3461-1b57-4398-b9c3-bbbbf2f971bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Serge van Ginderachter

unread,
Apr 8, 2014, 4:00:26 PM4/8/14
to ansible...@googlegroups.com
​Are you sure you want to automate this kind of upgrades?​

Sounds like an anti-pattern to me.


 Serge

anatoly techtonik

unread,
Apr 8, 2014, 5:12:41 PM4/8/14
to ansible...@googlegroups.com
Yes. Not this kind, but this specific.upgrade.

--
anatoly t.

anatoly techtonik

unread,
Apr 8, 2014, 5:27:50 PM4/8/14
to ansible...@googlegroups.com
Looks like this worked. Thanks.

- shell: echo "Yes, do as I say!" | apt-get install -y -q --force-yes
systemd-sysv
> 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/aoGgHrNCICs/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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAEnKK1zRVzEXy%2B5wkVbZCQoQ4721q-qLBetMeg1QP-FpfWp1Vg%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
anatoly t.

Michael DeHaan

unread,
Apr 9, 2014, 9:59:37 AM4/9/14
to ansible...@googlegroups.com
Did the apt module in Ansible also balk? 

We pass in a lot of parameters to it already to make it be automated, if more are needed, I'm open to it.




anatoly techtonik

unread,
Apr 9, 2014, 11:46:37 AM4/9/14
to ansible...@googlegroups.com
On Wed, Apr 9, 2014 at 4:59 PM, Michael DeHaan <mic...@ansible.com> wrote:
> Did the apt module in Ansible also balk?

Yep. Balked.

> We pass in a lot of parameters to it already to make it be automated, if
> more are needed, I'm open to it.

I am not sure. Systemd is quite an exceptional case and it is already
recorded in web
history.

Greg Andrews

unread,
Apr 9, 2014, 8:04:40 PM4/9/14
to ansible...@googlegroups.com
I'm thinking the question comes from the package's preinstall script rather than from apt-get.  Are you sure there is no preseed parameter you can use to answer the question?

  -Greg


Brian Coca

unread,
Apr 9, 2014, 10:13:56 PM4/9/14
to ansible...@googlegroups.com

considering the question I expect sirens, skull banners and 3 guys on a pulpit announcing the end of the world. Changing your init system is as traumatic as a new kernel and/or new libc.

anatoly techtonik

unread,
Apr 10, 2014, 2:14:59 AM4/10/14
to ansible...@googlegroups.com
I am not an expert. so I listed all parameters I could get. Anyway, piping
"Yes, do as I say!" phrase did help.
> 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/aoGgHrNCICs/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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAPdwyX4fUfBVsziJWvNBGv5bU4mNb0Kozf0jqnRLck1TwJMvzA%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
anatoly t.
Reply all
Reply to author
Forward
0 new messages