mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
'when: X' -> 'when: X | bool' for Ansibl 2.8
This commit is contained in:
parent
176abdd2f5
commit
3a1ccf3638
89 changed files with 248 additions and 248 deletions
|
@ -14,7 +14,7 @@
|
|||
#- php{{ php_version }}-xml
|
||||
- php{{ php_version }}-xmlrpc
|
||||
state: present
|
||||
when: is_debuntu
|
||||
when: is_debuntu | bool
|
||||
tags:
|
||||
- download
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
package:
|
||||
name: php-xml-parser
|
||||
state: present
|
||||
when: is_debian_8
|
||||
when: is_debian_8 | bool
|
||||
|
||||
- name: "Install packages: mysql, MySQL-python and 9 php packages (OS's other than debuntu)"
|
||||
package:
|
||||
|
@ -64,13 +64,13 @@
|
|||
systemd:
|
||||
name: "{{ mysql_service }}"
|
||||
state: started
|
||||
when: mysql_enabled
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: Enable MySQL systemd service (upon subsequent boots) if mysql_enabled
|
||||
systemd:
|
||||
name: "{{ mysql_service }}"
|
||||
enabled: yes
|
||||
when: mysql_enabled
|
||||
when: mysql_enabled | bool
|
||||
|
||||
# 'localhost' needs to be the last item for idempotency, see
|
||||
# http://ansible.cc/docs/modules.html#mysql-user
|
||||
|
@ -81,7 +81,7 @@
|
|||
host: localhost
|
||||
password: "{{ mysql_root_password }}"
|
||||
priv: "*.*:ALL,GRANT"
|
||||
when: mysql_enabled
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: Install .my.cnf file from template, with root password credentials, if mysql_enabled
|
||||
template:
|
||||
|
@ -89,7 +89,7 @@
|
|||
dest: /root/.my.cnf
|
||||
owner: root
|
||||
mode: 0600
|
||||
when: mysql_enabled
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: Update MySQL root password for all remaining root accounts (127.0.0.1, ::1) if mysql_enabled
|
||||
mysql_user:
|
||||
|
@ -101,26 +101,26 @@
|
|||
#- "{{ iiab_hostname }}.{{ iiab_domain }}"
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
when: mysql_enabled
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: Delete anonymous MySQL server user for {{ ansible_hostname }}, if mysql_enabled
|
||||
mysql_user:
|
||||
user: ""
|
||||
host: "{{ ansible_hostname }}"
|
||||
state: absent
|
||||
when: mysql_enabled
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: Delete anonymous MySQL server user for localhost, if mysql_enabled
|
||||
mysql_user:
|
||||
user: ""
|
||||
state: absent
|
||||
when: mysql_enabled
|
||||
when: mysql_enabled | bool
|
||||
|
||||
- name: Remove the MySQL 'test' database, if mysql_enabled
|
||||
mysql_db:
|
||||
db: test
|
||||
state: absent
|
||||
when: mysql_enabled
|
||||
when: mysql_enabled | bool
|
||||
|
||||
# we had to start mysql in order to configure it, now turn if off if not enabled
|
||||
- name: Config is done but now DISABLE MySQL service, if not mysql_enabled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue