关于如何运行以下剧本的任何建议?以下是我的剧本,主机文件和错误。
剧本
---
- hosts: fortigates
collections:
- fortinet.fortios
connection: httpapi
vars:
vdom: "root"
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: no
ansible_httpapi_port: 443
tasks:
- name: Configure global attributes.
fortios_system_global:
vdom: "{{ vdom }}"
system_global:
admintimeout: "23"
hostname: "FortiGate01"
主机文件
[fortigates]
fortigate01 ansible_host=192.168.0.103
ansible_user="admin"
ansible_password="password"
[fortigates:vars]
ansible_network_os=fortinet.fortios.fortios
ansible_python_interpreter=/user/bin/python3
输出错误
任务[聚会事实] ********************************************** ****************************************************** *********************************************** 致命的:[ansible_password = passwpord]:失败! => {“ ansible_facts”:{},“ changed”:false,“ failed_modules”:{“ setup”:{“ failed”:true,“ module_stderr”:“ / bin / sh:1:/ user / bin / python3 :找不到\ n“,” module_stdout“:”“,” msg“:”模块无法正确执行,您可能需要设置解释器。\ n请参见stdout / stderr了解确切错误“,” rc“:127 }},“ msg”:“以下模块执行失败:setup \ n”} 致命的:[ansible_user = admin]:失败! => {“ ansible_facts”:{},“ changed”:false,“ failed_modules”:{“ setup”:{“ failed”:true,“ module_stderr”:“ / bin / sh:1:/ user / bin / python3 :找不到\ n“,” module_stdout“:”“,” msg“:”模块无法正确执行,您可能需要设置解释器。\ n请参见stdout / stderr了解确切错误“,” rc“:127 }},“ msg”:“以下模块执行失败:setup \ n”} 致命的:[fortigate01]:失败! => {“ ansible_facts”:{},“ changed”:false,“ failed_modules”:{“ setup”:{“ failed”:true,“ module_stderr”:“ / bin / sh:1:/ user / bin / python3 :找不到\ n“,” module_stdout“:”“,” msg“:”模块无法正确执行,您可能需要设置解释器。\ n请参见stdout / stderr了解确切错误“,” rc“:127 }},“ msg”:“以下模块执行失败:setup \ n”}