ansible-playbook -i inventory/testenv ./deploy.yml提示line 1, column 3错误
来源:3-5 Ansible playbooks入门和编写规范(下)

smniuhe
2020-07-11
(.py3-a2.5-env) [deploy@iZuf6iq8e7ya9v3ix71k0pZ test_playbooks]$ ansible-playbook -i inventory/testenv ./deploy.yml
ERROR! The requested action was not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git submodule update --init --recursive' to correct this problem.
The error appears to have been in '/home/deploy/test_playbooks/roles/testbox/tasks/main.yml': line 1, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Print server name and user to remote testbox
^ here
The error appears to have been in '/home/deploy/test_playbooks/roles/testbox/tasks/main.yml': line 1, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Print server name and user to remote testbox
^ here
main.yml
- name: Print server name and user to remote testbox
shell: "echo 'Currently {{ user }} is logining {{ server_name }}' > {{ output }}"
6回答
-
smniuhe
提问者
2020-07-18
遇到这个问题,应该是某个安装环节出了问题,我是继续先前学,然后重新再安装,解决了,建议尽量和老师环境一样,可以减少错误率,github clone ansible repository 的问题可以通过 gitee 去解决
10 -
一路向北
2020-07-12
在ansible目录执行git submodule update --init --recursive
然后再尝试 deploy042022-03-14 -
smniuhe
提问者
2020-07-12
(.py3-a2.5-env) [deploy@iZuf6iq8e7ya9v3ix71k0pZ test_playbooks]$ vim deploy.yml
(.py3-a2.5-env) [deploy@iZuf6iq8e7ya9v3ix71k0pZ test_playbooks]$ vim inventory/testenv
(.py3-a2.5-env) [deploy@iZuf6iq8e7ya9v3ix71k0pZ test_playbooks]$ vim roles/testbox/tasks/main.yml
00 -
一路向北
2020-07-12
建议把代码内容发过来
012020-07-12 -
smniuhe
提问者
2020-07-12
相关代码和结构
00 -
一路向北
2020-07-12
建议把代码贴过来看一下
012020-07-12
相似问题