gpt4 book ai didi

mysql - Vagrant、Ansible 和 MySql : ERROR! 在任务中未检测到任何操作。这通常表示模块名称拼写错误或模块路径不正确

转载 作者:行者123 更新时间:2023-11-29 15:49:42 25 4
gpt4 key购买 nike

我正在处理 Symfony 中的一个项目。它带有一个 Vagrant 文件。当我 Vagrant 时,结果如下:

ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to be in '/home/chris/Projects/TechAnalyzePlatform/deploy/ansible/roles/db/tasks/mysql.yml': line 16, column 5, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

# http://ansible.cc/docs/modules.html#mysql-user - name: update mysql root password for all root accounts ^ here

Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.

mysql.yml 文件包含以下内容:

---
# MySQL setup
- name: Install MySQL/MariaDB
action: yum name={{ item }}
with_items:
- MySQL-python
- perl-Cache-Cache
- mariadb
- mariadb-server

- name: Start the MySQL service
action: service name=mariadb state=started enabled=yes

# 'localhost' needs to be the last item for idempotency, see
# http://ansible.cc/docs/modules.html#mysql-user
- name: update mysql root password for all root accounts
mysql_user: name=root host={{ item }} password=admin priv=*.*:ALL,GRANT
with_items:
- "{{ ansible_hostname }}"
- 127.0.0.1
- ::1
- localhost

- name: create /.my.cnf
template: src=my.cnf dest=~/.my.cnf

该模块存在,我应该在那里插入什么样的操作?是什么原因造成的?

非常感谢

最佳答案

解决方案:更新 Ansible。已解决。

关于mysql - Vagrant、Ansible 和 MySql : ERROR! 在任务中未检测到任何操作。这通常表示模块名称拼写错误或模块路径不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56835168/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com