Files
@ 3dd7f39302f8
Branch filter:
Location: majic-ansible-roles/roles/xmpp_server/tasks/main.yml - annotation
3dd7f39302f8
2.6 KiB
text/x-yaml
MAR-29: Implemented tests for php_website role:
- Install some additional tools for testing everything.
- Updated test playbook to change allowed extensions for running PHP scripts on
parameters-optional.
- Updated error page to use correct extension for parameters-optional test
instance.
- Expanded rewrite configuration slightly for parameters-optional.
- Install libmariadb-client-lgpl-dev-compat to test mysql_config symlink
creation.
- Deploy a number of PHP pages used for testing if pages are served correctly.
- Set file permissions on deployed PHP FPM pool configuraiton files.
- Use expanded syntax when deploying TLS keys/certificates in order to avoid
issues with TAB mangling.
- Fixed set-up of Strict-Transport-Security header when HTTPS enforcement is
disabled.
- Added a number of PHP and static test pages.
- Wrote tests covering full functionality of the role.
- Install some additional tools for testing everything.
- Updated test playbook to change allowed extensions for running PHP scripts on
parameters-optional.
- Updated error page to use correct extension for parameters-optional test
instance.
- Expanded rewrite configuration slightly for parameters-optional.
- Install libmariadb-client-lgpl-dev-compat to test mysql_config symlink
creation.
- Deploy a number of PHP pages used for testing if pages are served correctly.
- Set file permissions on deployed PHP FPM pool configuraiton files.
- Use expanded syntax when deploying TLS keys/certificates in order to avoid
issues with TAB mangling.
- Fixed set-up of Strict-Transport-Security header when HTTPS enforcement is
disabled.
- Added a number of PHP and static test pages.
- Wrote tests covering full functionality of the role.
2e1ff733350e 2e1ff733350e 2e1ff733350e 2e1ff733350e 2e1ff733350e 2e1ff733350e 2e1ff733350e 2e1ff733350e 2e1ff733350e 2e1ff733350e 2e1ff733350e b0e7faa211ae b0e7faa211ae b0e7faa211ae b0e7faa211ae 2e1ff733350e 0ad9410c243a 0ad9410c243a 0ad9410c243a 0ad9410c243a 0ad9410c243a 0ad9410c243a 284ed92d40bb 284ed92d40bb 284ed92d40bb 96e9f230a669 da031f975c67 da031f975c67 da031f975c67 da031f975c67 da031f975c67 da031f975c67 0ad9410c243a 0ad9410c243a 96e9f230a669 96e9f230a669 da031f975c67 da031f975c67 da031f975c67 da031f975c67 da031f975c67 da031f975c67 0ad9410c243a 0ad9410c243a 2e1ff733350e aa2802e42d9d aa2802e42d9d 701044d4cbba aa2802e42d9d 2e1ff733350e 701044d4cbba 2e1ff733350e 2e1ff733350e 1b05bae8e440 2e1ff733350e 2e1ff733350e 2e1ff733350e 701044d4cbba 2e1ff733350e 2e1ff733350e da031f975c67 da031f975c67 da031f975c67 da031f975c67 da031f975c67 da031f975c67 2e1ff733350e 2e1ff733350e 2e1ff733350e a561d73e3242 a561d73e3242 a561d73e3242 a561d73e3242 a561d73e3242 2e1ff733350e a561d73e3242 eb9a1b525c77 eb9a1b525c77 701044d4cbba eb9a1b525c77 dbc3381e1ff3 7387caca37f3 7387caca37f3 7387caca37f3 7387caca37f3 7387caca37f3 7387caca37f3 | ---
- name: Install Python apt bindings
apt: name=python-apt
- name: Add Prosody repository apt key
apt_key:
data: "{{ lookup('file', 'prosody-debian-packages.gpg') }}"
state: present
- name: Add Prosody repository
apt_repository: repo="deb http://packages.prosody.im/debian jessie main" state=present
- name: Install Lua Sec library (needed for TLS)
apt: name=lua-sec state=installed
- name: Install Lua LDAP library
apt: name=lua-ldap state=installed
- name: Install Prosody
apt: name=prosody state=installed
- name: Allow Prosody user to traverse the directory with TLS private keys
user: name=prosody append=yes groups=ssl-cert
- name: Deploy XMPP TLS private key
copy:
dest: "/etc/ssl/private/{{ ansible_fqdn }}_xmpp.key"
content: "{{ xmpp_tls_key }}"
mode: 0640
owner: root
group: prosody
notify:
- Restart Prosody
- name: Deploy XMPP TLS certificate
copy:
dest: "/etc/ssl/certs/{{ ansible_fqdn }}_xmpp.pem"
content: "{{ xmpp_tls_certificate }}"
mode: 0644
owner: root
group: root
notify:
- Restart Prosody
- name: Deploy configuration file for checking certificate validity via cron
copy: content="/etc/ssl/certs/{{ ansible_fqdn }}_xmpp.pem" dest="/etc/check_certificate/{{ ansible_fqdn }}_xmpp.conf"
owner=root group=root mode=0644
- name: Set-up directory for storing additional Prosody modules
file: path=/usr/local/lib/prosody/modules/ state=directory mode=0755 owner=root group=root
- name: Deploy the Prosody mod_auth_ldap module
get_url: url=https://hg.prosody.im/prosody-modules/raw-file/tip/mod_auth_ldap/mod_auth_ldap.lua
dest=/usr/local/lib/prosody/modules/mod_auth_ldap.lua
- name: Set-up file permissions for the Prosody mod_auth_ldap module
file: dest=/usr/local/lib/prosody/modules/mod_auth_ldap.lua owner=root group=root mode=0644
- name: Deploy Prosody configuration file
template:
src: prosody.cfg.lua.j2
dest: /etc/prosody/prosody.cfg.lua
owner: root
group: prosody
mode: 0640
notify:
- Restart Prosody
- name: Enable Prosody service on boot (workaround for systemctl broken handling of SysV)
command: rcconf -on prosody
register: result
changed_when: result.stderr == ""
- name: Enable and start Prosody service
service: name=prosody state=started
- name: Deploy firewall configuration for XMPP server
copy: src="ferm_xmpp.conf" dest="/etc/ferm/conf.d/30-xmpp.conf" owner=root group=root mode=0640
notify:
- Restart ferm
- name: Explicitly run all handlers
include: ../handlers/main.yml
when: "handlers | default(False) | bool() == True"
tags:
- handlers
|