Pessoal, Na tarefa de criar usuário no MySQL, estou recebendo o erro abaixo: TASK [Cria o usuário MySql] **** [WARNING]: The value **** (type int) in a string field was converted to u'****' (type string). If this does not look like what you expect, quote the entire value to ensure it does not change. [WARNING]: Module did not set no_log for update_password fatal: [172.17.177.40]: FAILED! => {"changed": false, "msg": "invalid privileges string: list index out of range"}
PLAY RECAP * 172.17.177.40 : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Segue abaixo o código que estou usando.
---
- hosts: all
tasks:
- name: ' Instala Pacotes e Dependencias'
apt:
name: "{{ item }}"
state: latest
become: yes
with_items:
- php5
- apache2
- libapache2-mod-php5
- php5-gd
- libssh2-php
- php5-mcrypt
- mysql-server-5.6
- python-mysqldb
- php5-mysql
- name: 'Instala o Mysql'
mysql_db:
name: wordpress_db
login_user: root
state: present
- name: ' Cria o usuário MySql'
mysql_user:
login_user: root
name: wordpress_user
password: 12345
priv: ' wordpress_db.*ALL'
state: present
- name: ' Baixa o arquivo do wordpress'
get_url:
url: 'http://wordpress.org/latest.tar.gz'
dest: '/temp/wordpress.tar.gz'
- name: ' Descompacta o arquivo wordpress'
unarchive:
src: '/tmp/wordpress.tar.gz'
dest: /var/www/
remote_src: yes
become: yes
- copy:
src: '/var/www/wordpress/wp-config-sample.php'
dest: '/var/www/wordpress/wp-config.php'
remote_src: yes
become: yes
- name: ' Configura o wp-config com as entradas do banco de dados'
replace:
path: '/var/www/wordpress/wp-config.php'
regexp: "{{ item.regex }}"
replace: "{{ item.value }}"
backup: yes
with_items:
- {regex: 'database_name_here', value: 'wordpress_db'}
- {regex: 'username_here', value: 'wordpress_use'}
- {regex: 'password_here', value: '12345'}
become: yes