[英]Ansible Role: MySQL unable to read configuration file
我收到以下错误。
'msg': 'AnsibleError: unable to read /the-ansibles/roles/mysql/templates/etc_mysql_my.cnf.j2', 'failed': True
我尝试了以下剧本configure.yml。
# file: roles/mysql/tasks/configure.yml
---
- hosts: test
remote_user: root
tasks:
- name: MySQL | Update the my.cnf
action: template src=/the-ansibles/roles/mysql/templates/etc_mysql_my.cnf.j2 dest=/etc/mysql/my.cnf owner=root group=root mode=0644
notify:
- restart mysql
`
while executimg this by this command: ansible-playbook configure.yml
the following error appears.
>>>>>
fatal: [test] => {'msg': 'AnsibleError: unable to read /the-ansibles/roles/mysql/templates/etc_mysql_my.cnf.j2', 'failed': True}
fatal: [test] => {'msg': 'AnsibleError: unable to read /the-ansibles/roles/mysql/templates/etc_mysql_my.cnf.j2', 'failed': True}
我的配置有什么问题?
在运行ansible的计算机上是否存在文件/the-ansibles/roles/mysql/templates/etc_mysql_my.cnf.j2?
模板化文件必须位于本地计算机上而不是远程计算机上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.