mysql: install python dependencies earlier
This commit is contained in:
parent
73d6979e72
commit
679875d00b
|
@ -50,3 +50,11 @@
|
||||||
tags:
|
tags:
|
||||||
- mysql
|
- mysql
|
||||||
- packages
|
- packages
|
||||||
|
|
||||||
|
- name: Python dependencies for Ansible are installed
|
||||||
|
apt:
|
||||||
|
name: python-mysqldb
|
||||||
|
state: present
|
||||||
|
tags:
|
||||||
|
- mysql
|
||||||
|
- packages
|
||||||
|
|
|
@ -36,3 +36,25 @@
|
||||||
tags:
|
tags:
|
||||||
- mysql
|
- mysql
|
||||||
- packages
|
- packages
|
||||||
|
|
||||||
|
- name: Python2 dependencies for Ansible are installed
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- python-mysqldb
|
||||||
|
- python-pymysql
|
||||||
|
state: present
|
||||||
|
tags:
|
||||||
|
- mysql
|
||||||
|
- packages
|
||||||
|
when: ansible_python_version is version('3', '<')
|
||||||
|
|
||||||
|
- name: Python3 dependencies for Ansible are installed
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- python3-mysqldb
|
||||||
|
- python3-pymysql
|
||||||
|
state: present
|
||||||
|
tags:
|
||||||
|
- mysql
|
||||||
|
- packages
|
||||||
|
when: ansible_python_version is version('3', '>=')
|
|
@ -1,25 +1,5 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Python2 dependencies for Ansible are installed
|
|
||||||
apt:
|
|
||||||
name:
|
|
||||||
- python-mysqldb
|
|
||||||
- python-pymysql
|
|
||||||
state: present
|
|
||||||
tags:
|
|
||||||
- mysql
|
|
||||||
when: ansible_python_version is version('3', '<')
|
|
||||||
|
|
||||||
- name: Python3 dependencies for Ansible are installed
|
|
||||||
apt:
|
|
||||||
name:
|
|
||||||
- python3-mysqldb
|
|
||||||
- python3-pymysql
|
|
||||||
state: present
|
|
||||||
tags:
|
|
||||||
- mysql
|
|
||||||
when: ansible_python_version is version('3', '>=')
|
|
||||||
|
|
||||||
- name: create a password for mysqladmin
|
- name: create a password for mysqladmin
|
||||||
command: "apg -n 1 -m 16 -M lcN"
|
command: "apg -n 1 -m 16 -M lcN"
|
||||||
register: mysql_admin_password
|
register: mysql_admin_password
|
||||||
|
|
|
@ -5,13 +5,6 @@
|
||||||
msg: "We can't create other users with 'debian-sys-maint' on Debian 8 with MariaDB.\nWe must give it the GRANT privilege before continuing."
|
msg: "We can't create other users with 'debian-sys-maint' on Debian 8 with MariaDB.\nWe must give it the GRANT privilege before continuing."
|
||||||
when: mysql_variant == "mariadb"
|
when: mysql_variant == "mariadb"
|
||||||
|
|
||||||
- name: Python dependencies for Ansible are installed
|
|
||||||
apt:
|
|
||||||
name: python-mysqldb
|
|
||||||
state: present
|
|
||||||
tags:
|
|
||||||
- mysql
|
|
||||||
|
|
||||||
- name: create a password for mysqladmin
|
- name: create a password for mysqladmin
|
||||||
command: "apg -n 1 -m 16 -M lcN"
|
command: "apg -n 1 -m 16 -M lcN"
|
||||||
register: mysql_admin_password
|
register: mysql_admin_password
|
||||||
|
|
Loading…
Reference in a new issue