[root@ansible ansible_playbook]# ansible-playbook -C rsync.yaml ERROR! this task 'copy' has extra params, which is only allowed in the following modules: ansible.builtin.raw, ansible.legacy.add_host, ansible.builtin.meta, ansible.legacy.include, ansible.legacy.import_role, script, ansible.legacy.raw, group_by, ansible.builtin.shell, ansible.legacy.win_command, include, shell, include_vars, ansible.builtin.import_tasks, add_host, ansible.builtin.include_vars, ansible.legacy.include_role, ansible.builtin.include_role, ansible.legacy.include_vars, ansible.legacy.win_shell, ansible.legacy.group_by, import_tasks, ansible.builtin.set_fact, ansible.builtin.command, ansible.builtin.include_tasks, include_tasks, ansible.builtin.script, ansible.builtin.include, raw, meta, ansible.legacy.set_fact, ansible.builtin.add_host, ansible.legacy.script, ansible.legacy.import_tasks, win_command, ansible.builtin.win_shell, include_role, win_shell, set_fact, ansible.legacy.shell, ansible.legacy.command, import_role, ansible.legacy.meta, ansible.builtin.import_role, ansible.legacy.include_tasks, ansible.builtin.group_by, ansible.builtin.win_command, command The error appears to be in '/etc/ansible/ansible_playbook/rsync.yaml': line 11, column 7, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: create rsync local user ^ here
时间: 2024-04-22 15:25:37 浏览: 294
ansible_playbook-baseline-online-server:公共服务的通用配置集合
这个错误提示表明在'/etc/ansible/ansible_playbook/rsync.yaml'文件的第11行第7列附近存在错误。根据错误信息,问题出现在名为"create rsync local user"的任务上。这个任务可能使用了不被允许的额外参数。
根据Ansible的文档,只有特定的模块允许使用额外参数,如:ansible.builtin.raw、ansible.legacy.add_host、ansible.builtin.meta等。你需要检查该任务的参数,确保没有使用不被允许的额外参数。
阅读全文