Hi again, I found the problem. I did not realize from change the name of the values in template and I only changed it in the defaults file.
*myisam-recover-options = {{ mysql_myisam-recover-options }}* So, I correct it and it works. Thanks! El martes, 23 de agosto de 2016, 13:03:25 (UTC-3), Sergio (cepxio) escribió: > > Hi all! > > I am new in Ansible and this Group, so thanks in advance for the patience > and help. > > I'm writing a Playbook Roles for install and setup MySQL RDBMS on Linux > (CentOS), and I get an error with the template module when ansible parses > the my.cnf.j2. > Here the msg err > > > TASK [mysql : Copy my.cnf global MySQL configuration.] > ************************* > task path: /opt/settings/ansible/roles/mysql/tasks/configure.yml:2 > fatal: [v1080udesa]: FAILED! => {"changed": false, "failed": true, > "invocation": {"module_args": {"dest": "/etc/my.cnf", "group": "root", > "mode": "0644", "owner": "root", "src": "my.cnf.j2"}, "module_name": > "template"}, "msg": "AnsibleUndefinedVariable: Unable to look up a name or > access an attribute in template string (# The MySQL database server > configuration file.\n *[ cut output for sanity ]* key_buffer\t\t\t= > 64M\n\n).\nMake sure your variable name does not contain invalid characters > like '-': unsupported operand type(s) for -: 'StrictUndefined' and > 'StrictUndefined'"} > to retry, use: --limit @install_mysql.retry > > PLAY RECAP > ********************************************************************* > > I'm refurbishing one Role from Ansible-Galaxy, so I think that this works > already for others DBAs. (but i don't know if this version work) > I searched several roles on Galaxy and all users have the same template > command and similar template file. > In addition, I leave the link: > https://galaxy.ansible.com/geerlingguy/mysql/ > Could someone help me to find if it is an error with the playbook or a > version bug? > > Regards! > > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4111bde1-7a2e-42cf-8da8-f780d550e9c7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.