小编Cha*_* Ck的帖子

使用 ansible.builtin.shell 时出现 ansible 问题

$ ansible all -m ansible.builtin.shell  -a 'echo $TERM'
ERROR! this task 'ansible.builtin.shell' has extra params, which is only
allowed in the following modules: import_role, win_command,
include_vars, include_tasks, raw, win_shell, command, add_host, 
meta, include_role, shell, import_tasks, group_by, set_fact, script, include
Run Code Online (Sandbox Code Playgroud)

谁能帮我找出问题所在

这是带有-vvv标签的

$ ansible -vvv centos -m ansible.builtin.shell  -a 'echo $TERM'
ansible 2.9.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/chandru/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.5 (default, …
Run Code Online (Sandbox Code Playgroud)

shell echo ansible

5
推荐指数
1
解决办法
6684
查看次数

标签 统计

ansible ×1

echo ×1

shell ×1