---
- name: Shut interface down
collections:
- fortinet.fortios
hosts: forti.switch
connection: httpapi
vars:
vdom: "root"
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: no
ansible_httpapi_port: 443
tasks:
- name: Disable port
fortios_system_physical_switch:
state: "present"
system_physical_switch:
name: "port5"
port:
-
name: "port5"
status: "down"
[forti.switch]
fortiswitch01 ansible_host=192.168.1.99 ansible_user="admin" ansible_password="mypass"
[forti.switch:vars]
ansible_network_os=fortinet.fortios.fortios
fatal: [fortiswitch01]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"access_token": null,
"enable_log": null,
"member_path": null,
"member_state": null,
"state": "present",
"system_physical_switch": {
"age_enable": null,
"age_val": null,
"name": "port5",
"port": [
{
"name": "port5",
"status": "down"
}
]
},
"vdom": "root"
}
},
"meta": {
"build": 488,
"cmdb-checksum": "10474624100130647167",
"cmdb-index": "480",
"error_reason": "unable to create query for 'system.physical-switch'",
"http_method": "PUT",
"http_status": 400,
"name": "port5",
"path": "system",
"serial": "S108EN4N17000745",
"status": "error",
"timestamp": "1970-01-01T01:40:11Z",
"vdom": "root",
"version": "v6.4.9"
},
"msg": "Error in repo",
"version_check_warning": {
"matched": false,
"mismatches": [
"option port not supported since v6.2.3"
],
"system_version": "v6.4.9"
}
}
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Created on 03-01-2022 06:12 AM Edited on 03-01-2022 06:25 AM
Hello @antton ,
Thank you for using the Community Forum. I will seek to get you an answer or help. We will reply to this thread with an update as soon as possible.
Thanks,
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1733 | |
1106 | |
752 | |
447 | |
240 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.