Files
@ f05151d6f802
Branch filter:
Location: majic-ansible-roles/roles/database_server/tasks/main.yml - annotation
f05151d6f802
1.5 KiB
text/x-yaml
MAR-132: Added support for Debian 9 (Stretch) to wsgi_website role:
- Set the shell for application system account explicitly (workaround
for Debian bug 865762 in Stretch).
- Updated Molecule tests to cover Debian 9.
- Updated Molecule test preparation playbook to account for a number
of differences between Jessie and Stretch (mainly related to mailing
functionality).
- Renamed a couple of variables in test for sending out mails to make
it clearer what is being looked up as part of regex matching.
- Updated Molecule tests where certain paths depend on what Debian
release they are ran against.
- Split-up Jessie-specific tests into separate file.
- Remove the /bin/ss utility instead of renaming it (testinfra socket
tests do not work with /bin/ss).
- Set the shell for application system account explicitly (workaround
for Debian bug 865762 in Stretch).
- Updated Molecule tests to cover Debian 9.
- Updated Molecule test preparation playbook to account for a number
of differences between Jessie and Stretch (mainly related to mailing
functionality).
- Renamed a couple of variables in test for sending out mails to make
it clearer what is being looked up as part of regex matching.
- Updated Molecule tests where certain paths depend on what Debian
release they are ran against.
- Split-up Jessie-specific tests into separate file.
- Remove the /bin/ss utility instead of renaming it (testinfra socket
tests do not work with /bin/ss).
09625826d96f 09625826d96f 09625826d96f 0ffaf31692ce 0ffaf31692ce 91b633aba998 09625826d96f 09625826d96f 09625826d96f 09625826d96f 09625826d96f a561d73e3242 a561d73e3242 a561d73e3242 a561d73e3242 a561d73e3242 09625826d96f 0ffaf31692ce 0ffaf31692ce 0ffaf31692ce 09625826d96f 09625826d96f 0ffaf31692ce 91b633aba998 0ffaf31692ce 0ffaf31692ce 09625826d96f 09625826d96f 0ffaf31692ce 0ffaf31692ce 0ffaf31692ce 0ffaf31692ce 0ffaf31692ce 0ffaf31692ce 09625826d96f 09625826d96f 0ffaf31692ce 0ffaf31692ce 0ffaf31692ce 0ffaf31692ce 0ffaf31692ce 0ffaf31692ce 19b15357124a 19b15357124a 19b15357124a 0ffaf31692ce 0ffaf31692ce 0ffaf31692ce 19b15357124a 18f93a9a8b05 18f93a9a8b05 18f93a9a8b05 18f93a9a8b05 18f93a9a8b05 18f93a9a8b05 7387caca37f3 7387caca37f3 7387caca37f3 7387caca37f3 7387caca37f3 18f93a9a8b05 | ---
- name: Install MariaDB
apt:
name: "{{ item }}"
state: present
with_items:
- mariadb-client
- mariadb-server
- python-mysqldb
- name: Enable MariaDB service on boot (workaround for systemctl broken handling of SysV)
command: rcconf -on mysql
register: result
changed_when: result.stderr == ""
- name: Enable and start MariaDB
service:
name: mysql
state: started
- name: Set password for the root database user
mysql_user:
check_implicit_admin: true
name: root
password: "{{ db_root_password }}"
- name: Deploy username and password for the root database user
template:
src: "root_my.cnf.j2"
dest: "/root/.my.cnf"
owner: root
group: root
mode: 0400
- name: Set UTF-8 encoding as default for MariaDB
copy:
src: "utf8.cnf"
dest: "/etc/mysql/conf.d/utf8.cnf"
owner: root
group: root
mode: 0644
register: mariadb_utf8_configuration
- name: Restart MariaDB in order to use UTF-8 as default character set
service:
name: mysql
state: restarted
when: mariadb_utf8_configuration.changed
tags:
# [ANSIBLE0016] Tasks that run when changed should likely be handlers
# UTF-8 configuration must be applied immediatelly in order to ensure that
# subsequent tasks that create databases will end-up with correct (UTF-8)
# encoding. Otherwise they will be created using default latin1.
- skip_ansible_lint
- name: Explicitly run all handlers
include: ../handlers/main.yml
when: "handlers | default(False) | bool() == True"
tags:
- handlers
|