1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #471 from holta/master

tweak 2-common/tasks/udev.yml + mysql/tasks/main.yml + monit/tasks/main.yml
This commit is contained in:
A Holt 2017-10-28 07:46:52 -04:00 committed by GitHub
commit 366aa0be51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 16 deletions

View file

@ -23,13 +23,12 @@
shell: systemctl daemon-reload
when: udev_unit.stat.exists is defined and udev_unit.stat.exists
- name: restart so systemd recognizes the changes
- name: Restart so systemd recognizes the changes
shell: systemctl restart systemd-udevd.service
when: udev_unit.stat.exists is defined and udev_unit.stat.exists
- name: reload systemd-udevd so it has rootfs open read-write
- name: Reload systemd-udevd so it has rootfs open read-write
template: src=udev-reload.service dest=/etc/systemd/system/
- name: enable the reload service
- name: Enable the reload service
shell: systemctl enable udev-reload.service

View file

@ -1,10 +1,10 @@
- name: Install monit package
- name: Install Monit package
package: name=monit
state=present
tags:
- download
- name: Install chkconfig package -- not in debian 9
- name: Install chkconfig package -- not in Debian 8
package: name=chkconfig
state=present
when: is_debian and ansible_distribution_major_version == "8"
@ -34,14 +34,14 @@
delay: 1
#TODO: create systemd script
- name: Enable monit service
- name: Enable 'monit' service
command: chkconfig monit on
when: is_debian and ansible_local.local_facts.os_ver == "debian-8"
#- name: Restart monit service
# command: service monit restart
- name: Add monit to service list
- name: Add 'monit' to service list
ini_file: dest='{{ service_filelist }}'
section=monit
option='{{ item.option }}'
@ -50,6 +50,6 @@
- option: name
value: monit
- option: description
value: '"Monit is a background service monitor which can correct problems, send email, restart services"'
value: '"Monit is a background service monitor which can correct problems, send email, restart services."'
- option: enabled
value: "{{ monit_enabled }}"

View file

@ -1,4 +1,4 @@
- name: Install MySQL Debian
- name: Install MySQL for Debian/Debuntu
package: name={{ item }}
state=present
with_items:
@ -18,15 +18,15 @@
tags:
- download
- name: php-xml for ubuntu and debian-9
- name: php-xml for 'ubuntu' and 'debian-9'
package: name=php{{ php_version }}-xml state=present
when: is_ubuntu or is_debian_9
- name: php-xml for debian-8
- name: php-xml for 'debian-8'
package: name=php-xml-parser state=present
when: is_debian_8
- name: Install MySQL
- name: Install MySQL for non-Debian/Debuntu
package: name={{ item }}
state=present
with_items:
@ -78,7 +78,7 @@
template: src=my.cnf.j2 dest=/root/.my.cnf owner=root mode=0600
when: mysql_enabled
- name: Update mysql root password for all remaining root accounts
- name: Update MySQL root password for all remaining root accounts
mysql_user: name=root host={{ item }} password={{ mysql_root_password }} priv=*.*:ALL,GRANT
with_items:
# - "{{ iiab_hostname }}.{{ iiab_domain }}"
@ -105,7 +105,7 @@
state=stopped
when: not mysql_enabled
- name: Add mysql to service list
- name: Add 'mysql' to service list
ini_file: dest='{{ service_filelist }}'
section=mysql
option='{{ item.option }}'
@ -114,6 +114,6 @@
- option: name
value: mysql-database
- option: description
value: '"MySQL is a widely used database service on the Internet which runs on many platforms, and is often offered and available at hosting Internet Service Providers"'
value: '"MySQL is a widely used free and open source (GPLv2) database, offered by most web hosting services, on a diversity of platforms."'
- option: enabled
value: "{{ mysql_enabled }}"