root@:~/git/ihde-drupalvm-diskursnet# systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Mon 2020-09-07 15:28:53 CEST; 15min ago
Main PID: 10550 (apache2)
Tasks: 55 (limit: 4915)
CGroup: /system.slice/apache2.service
├─10550 /usr/sbin/apache2 -k start
├─10551 /usr/sbin/apache2 -k start
└─10552 /usr/sbin/apache2 -k start
Sep 07 15:28:52 discourseanalysis systemd[1]: Starting The Apache HTTP Server...
Sep 07 15:28:52 discourseanalysis apachectl[10526]: AH00112: Warning: DocumentRoot [/var/www/drupalvm/drupal/web] does not exist
Sep 07 15:28:53 discourseanalysis apachectl[10526]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName
Sep 07 15:28:53 discourseanalysis systemd[1]: Started The Apache HTTP Server.
root@:~/git/ihde-drupalvm-diskursnet# journalctl -u apache2.service
-- Logs begin at Mon 2020-09-07 00:05:59 CEST, end at Mon 2020-09-07 15:43:11 CEST. --
Sep 07 15:16:57 discourseanalysis systemd[1]: Starting The Apache HTTP Server...
Sep 07 15:16:57 discourseanalysis apachectl[11560]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName
Sep 07 15:16:57 discourseanalysis systemd[1]: Started The Apache HTTP Server.
Sep 07 15:17:06 discourseanalysis systemd[1]: Stopping The Apache HTTP Server...
Sep 07 15:17:06 discourseanalysis apachectl[12348]: AH00112: Warning: DocumentRoot [/var/www/drupalvm/drupal/web] does not exist
Sep 07 15:17:06 discourseanalysis apachectl[12348]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName
Sep 07 15:17:06 discourseanalysis systemd[1]: Stopped The Apache HTTP Server.
Sep 07 15:28:52 discourseanalysis systemd[1]: Starting The Apache HTTP Server...
Sep 07 15:28:52 discourseanalysis apachectl[10416]: AH00112: Warning: DocumentRoot [/var/www/drupalvm/drupal/web] does not exist
Sep 07 15:28:52 discourseanalysis apachectl[10416]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName
Sep 07 15:28:52 discourseanalysis systemd[1]: Started The Apache HTTP Server.
Sep 07 15:28:52 discourseanalysis systemd[1]: Stopping The Apache HTTP Server...
Sep 07 15:28:52 discourseanalysis apachectl[10521]: AH00112: Warning: DocumentRoot [/var/www/drupalvm/drupal/web] does not exist
Sep 07 15:28:52 discourseanalysis apachectl[10521]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName
Sep 07 15:28:52 discourseanalysis systemd[1]: Stopped The Apache HTTP Server.
Sep 07 15:28:52 discourseanalysis systemd[1]: Starting The Apache HTTP Server...
Sep 07 15:28:52 discourseanalysis apachectl[10526]: AH00112: Warning: DocumentRoot [/var/www/drupalvm/drupal/web] does not exist
Sep 07 15:28:53 discourseanalysis apachectl[10526]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName
Sep 07 15:28:53 discourseanalysis systemd[1]: Started The Apache HTTP Server.
Summary
I have included apache_state: stopped in my config.yml. I was quite happy about finding the directive in geerlingguy.apache role, to keep server as much closed as possible, until I do server hardening afterwards.
I would expect apache being kept stopped during the installation - when I probed systemctl status apache2.service after the playbook was through, I saw apache up and running.
I have looked through to output to find nothing suspicious. I also (naively) searched through the ansible roles where apache service could be (re)activated by accident, but I did not discover anything.
I don't know if SystemRestart=on-abort in/etc/systemd/system/multi-user.target.wants/apache2.service could have to do something with it. Stopping the sevice via systemctl does not trigger on-abort.
Issue Type
Your Environment
apt list --installed | grep ansible
: ansible/bionic,bionic,now 2.9.13-1ppa~bionic all [installed] 6.0.0 branchYour OS
Linux Ubuntu 18.04
Full console output
Sorry for pasting the output here, Github Gists seem to be a payed feature?
Summary
I have included
apache_state: stopped
in my config.yml. I was quite happy about finding the directive in geerlingguy.apache role, to keep server as much closed as possible, until I do server hardening afterwards.I would expect apache being kept stopped during the installation - when I probed
systemctl status apache2.service
after the playbook was through, I saw apache up and running.I have looked through to output to find nothing suspicious. I also (naively) searched through the ansible roles where apache service could be (re)activated by accident, but I did not discover anything.
I don't know if SystemRestart=on-abort in/etc/systemd/system/multi-user.target.wants/apache2.service could have to do something with it. Stopping the sevice via systemctl does not trigger on-abort.