Exactly what I did, I deleted the cert and it now works.
I'll revisit getting https working, once I get the overall deployment back on track. Very much appreciate the insights!
Original Message:
Sent: Tue September 24, 2024 09:47 AM
From: Sergei Kubin
Subject: Ansible broacde.fos collection on level v8.2.1C
You say that you've enabled http -- have you done that on the ansible side or switch side?
For the switch side - what I'm trying to say is that you need to check if you've got http allowed on the switch. And having a certificate installed (even a self-signed one) will restrict HTTP. You might need to delete it (seccermgmt delete -cert https).
By the way, my lab switch with v8.2.3 returns clear message instead of redirecting:
<error-message>HTTP interface is disabled. Please use HTTPS.</error-message>
<error-info>
<error-code>48</error-code>
<error-module>rest</error-module>
</error-info>
------------------------------
Sergei Kubin
Original Message:
Sent: Tue September 24, 2024 09:34 AM
From: Mark Steele
Subject: Ansible broacde.fos collection on level v8.2.1C
Thanks Sergei,
That did lead me to the solution, even thought HTTP is enabled:
admin> mgmtapp --show
REST Interface State: Enabled
REST Session Count: 3
REST Throttling Configurations:
Sample Requests : 30
Sample Time (in sec) : 30
Idle Time (in sec) : 3
KeepAlive : Disabled
KeepAliveTimeout : 15sec
When I tried to connect to it, I received this:
$ curl http://10.82.20.230
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href=https://10.82.20.230/>here</a>.</p>
</body></html>
I simply deleted the cert and now it works. Thanks!
------------------------------
Mark Steele
Original Message:
Sent: Tue September 24, 2024 08:13 AM
From: Sergei Kubin
Subject: Ansible broacde.fos collection on level v8.2.1C
Hi Mark,
it seems that you've got HTTP disabled on that switch, as the error suggests you to use HTTPS.
Do you have HTTPS cert installed on the switch? (seccertmgmt show -all)
------------------------------
Sergei Kubin
Original Message:
Sent: Mon September 23, 2024 02:02 PM
From: Mark Steele
Subject: Ansible broacde.fos collection on level v8.2.1C
I've successfully used the brocade.fos collection to create zones, aliases, etc. on the new switches running version 9.x of the FOS code. Yet when I try to connect to some older SAN switches, running FOS v8.2.1.c, which shows as supported, I get an error:
fatal: [localhost]: FAILED! => {"POST_resp_code": 301, "POST_resp_data": "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>301 Moved Permanently</title>\n</head><body>\n<h1>Moved Permanently</h1>\n<p>The document has moved <a href=\"https://********/rest/login\">here</a>.</p>\n</body></html>\n", "POST_resp_reason": "Moved Permanently", "POST_url": "http://********/rest/login", "changed": false, "msg": "POST failed"}
Module I'm trying to run:
credential:
fos_ip_addr: "{{ fos_ip }}"
fos_user_name: admin
fos_password: "{{ fos_password }}"
https: false
tasks:
- name: Gather SAN Switch details
brocade.fos.brocade_facts:
credential: "{{ credential }}"
gather_subset:
- brocade_zoning
Just wondering if anyone else has run into this and found a solution.
Thanks,
-Mark
------------------------------
Mark Steele
------------------------------