0

I have the following play snippet:

 27   - name: ensure necessary packages are installed
 28     apt:
 29       state: present
 30       name:
 31         - apache2
 32         - libapache2-mod-rpaf
 33         - nginx

I don't run IPv6 (LAN) so I have ipv6.disable=1 in my boot args. When Ansible installs Nginx, it defaults to listening on listen [::]:80 default_server; and returns an error in the play. How can I tell Ansible/apt not to start Nginx (or any service for that matter.. probably the same story with Apache) when installing the package?

Server Fault
  • 3,454
  • 7
  • 48
  • 88
  • This is a long standing design flaw with Debian and Debian-based systems. Ansible cannot really fix it or even work around it. Have you considered using another distro? In the meantime see the workarounds in the linked question. – Michael Hampton Feb 19 '19 at 14:54
  • Ha ha /s.. Yes. And they all have their fair share of things that suck about them. Seriously no way to disable that (aside from hackery)? – Server Fault Feb 19 '19 at 15:00
  • Nope...and sometimes the hackery doesn't work either. They do this intentionally. I've finally eradicated all trace of Debian from my production environments... – Michael Hampton Feb 19 '19 at 15:01
  • Ugh.. alright. Thanks for the info. – Server Fault Feb 19 '19 at 15:02
  • For anyone else running into this.. I ended up adding the `/usr/sbin/policy-rc.d` hack linked above and then only installing `apache` and `nginx` in a play right after that. Very next play removes `policy-rc.d` so any other packages installed can behave normally. – Server Fault Feb 19 '19 at 18:42

0 Answers0