How to move fresh Debian to systemd with Ansible?

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?

Maybe this will work?

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

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

Sounds like an anti-pattern to me.

Serge

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

Looks like this worked. Thanks.

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

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.

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.

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

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.

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