diff options
author | Lars Wirzenius <lwirzenius@wikimedia.org> | 2019-07-07 18:45:44 +0300 |
---|---|---|
committer | Lars Wirzenius <lwirzenius@wikimedia.org> | 2019-07-07 18:45:44 +0300 |
commit | c6bd729f0565c12af68a20857928a96f854063f5 (patch) | |
tree | 1ebe117d0eed4848ac3b578f1f825c05ea8634da /roles/apache2 | |
parent | bab01a58a170027e7fa7641deb6bec4006f4fcae (diff) | |
download | wmf-gitlab-c6bd729f0565c12af68a20857928a96f854063f5.tar.gz |
Add: mock for test env
Diffstat (limited to 'roles/apache2')
-rw-r--r-- | roles/apache2/files/testenv.conf | 11 | ||||
-rw-r--r-- | roles/apache2/tasks/main.yml | 22 |
2 files changed, 33 insertions, 0 deletions
diff --git a/roles/apache2/files/testenv.conf b/roles/apache2/files/testenv.conf new file mode 100644 index 0000000..a286ecb --- /dev/null +++ b/roles/apache2/files/testenv.conf @@ -0,0 +1,11 @@ +<VirtualHost *:80> + ServerName wmf2-testenv.vm.liw.fi + ServerAdmin liw@liw.fi + DocumentRoot /srv/http + ErrorLog /var/log/apache2/testenv.error.log + CustomLog /var/log/apache2/testenv.access.log combined + <Directory /srv/http> + Options +Indexes + Require all granted + </Directory> +</VirtualHost> diff --git a/roles/apache2/tasks/main.yml b/roles/apache2/tasks/main.yml new file mode 100644 index 0000000..2757ee4 --- /dev/null +++ b/roles/apache2/tasks/main.yml @@ -0,0 +1,22 @@ +- name: "create /srv/http" + file: + state: directory + path: /srv/http + +- name: "install apache2" + apt: + name: apache2 + +- name: "add virtual host for /srv/http" + copy: + src: testenv.conf + dest: /etc/apache2/sites-available/testenv.conf + +- name: "enable virtual host" + shell: | + a2ensite testenv + +- name: "restart apache2" + systemd: + name: apache2 + state: restarted |