# How to move fresh Debian to systemd with Ansible?

**URL:** <https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971>\
**Category:** Ansible Project\
**Created:** [April 8, 2014, 7:26pm UTC](https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971 "2014-04-08T19:26:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anatoly\_techtonik](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anatoly\_techtonik](https://forum.ansible.com/u/anatoly_techtonik)\
**Post date:** [April 8, 2014, 7:26pm UTC](https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971/1 "2014-04-08T19:26:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![drybjed](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@drybjed](https://forum.ansible.com/u/drybjed)\
**Post date:** [April 8, 2014, 7:27pm UTC](https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971/2 "2014-04-08T19:27:43Z")

</div>

Maybe this will work?

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

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [April 8, 2014, 8:00pm UTC](https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971/3 "2014-04-08T20:00:26Z")

</div>

​Are you sure you want to automate this kind of upgrades?​

Sounds like an anti-pattern to me.

Serge

---

<div class="post-metadata">

**Author:** ![anatoly\_techtonik](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anatoly\_techtonik](https://forum.ansible.com/u/anatoly_techtonik)\
**Post date:** [April 8, 2014, 9:12pm UTC](https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971/4 "2014-04-08T21:12:41Z")

</div>

Yes. Not this kind, but this specific.upgrade.

---

<div class="post-metadata">

**Author:** ![anatoly\_techtonik](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anatoly\_techtonik](https://forum.ansible.com/u/anatoly_techtonik)\
**Post date:** [April 8, 2014, 9:27pm UTC](https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971/5 "2014-04-08T21:27:50Z")

</div>

Looks like this worked. Thanks.

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

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [April 9, 2014, 1:59pm UTC](https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971/6 "2014-04-09T13:59:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anatoly\_techtonik](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anatoly\_techtonik](https://forum.ansible.com/u/anatoly_techtonik)\
**Post date:** [April 9, 2014, 3:46pm UTC](https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971/7 "2014-04-09T15:46:37Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Greg\_Andrews](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@Greg\_Andrews](https://forum.ansible.com/u/Greg_Andrews)\
**Post date:** [April 10, 2014, 12:04am UTC](https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971/8 "2014-04-10T00:04:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [April 10, 2014, 2:13am UTC](https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971/9 "2014-04-10T02:13:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anatoly\_techtonik](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anatoly\_techtonik](https://forum.ansible.com/u/anatoly_techtonik)\
**Post date:** [April 10, 2014, 6:14am UTC](https://forum.ansible.com/t/how-to-move-fresh-debian-to-systemd-with-ansible/14971/10 "2014-04-10T06:14:59Z")

</div>

I am not an expert. so I listed all parameters I could get. Anyway, piping  
"Yes, do as I say!" phrase did help.
