mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-09 19:30:18 +01:00
Issue #9: Allow mysql_packages to be overridden.
This commit is contained in:
parent
5ff8709f6b
commit
361126b8b0
4 changed files with 17 additions and 2 deletions
|
@ -9,6 +9,13 @@ mysql_enabled_on_startup: yes
|
|||
# for RedHat systems (and derivatives).
|
||||
mysql_enablerepo: ""
|
||||
|
||||
# Define a custom list of packages to install; if none provided, the default
|
||||
# package list from vars/[OS-family].yml will be used.
|
||||
# mysql_packages:
|
||||
# - mysql
|
||||
# - mysql-server
|
||||
# - MySQL-python
|
||||
|
||||
# MySQL connection settings.
|
||||
mysql_port: "3306"
|
||||
mysql_bind_address: '0.0.0.0'
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
---
|
||||
# Include variables and define needed variables.
|
||||
- name: Include OS-specific variables.
|
||||
include_vars: "{{ ansible_os_family }}.yml"
|
||||
|
||||
- name: Define mysql_packages.
|
||||
set_fact:
|
||||
mysql_packages: "{{ __mysql_packages | list }}"
|
||||
when: mysql_packages is not defined
|
||||
|
||||
# Setup/install tasks.
|
||||
- include: setup-RedHat.yml
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
- include: setup-Debian.yml
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
# Configure MySQL.
|
||||
- include: configure.yml
|
||||
- include: secure-installation.yml
|
||||
- include: databases.yml
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
mysql_daemon: mysql
|
||||
mysql_config_file: /etc/mysql/my.cnf
|
||||
mysql_packages:
|
||||
__mysql_packages:
|
||||
- mysql-common
|
||||
- mysql-server
|
||||
- python-mysqldb
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
mysql_daemon: mysqld
|
||||
mysql_config_file: /etc/my.cnf
|
||||
mysql_packages:
|
||||
__mysql_packages:
|
||||
- mysql
|
||||
- mysql-server
|
||||
- MySQL-python
|
||||
|
|
Loading…
Reference in a new issue