Welcome to FOS-ansible documentation!
FOS-Ansible Introduction
This repository provides reference example Modules & Playbooks for Ansible to manage Fibre Channel switches running different FOS versions. Tested with Ansible 4.5.0 running Python 3.8.5. Also, Tested with AWX 13.0.0.
Installation from Github.com
Step1: clone the repository
HTTPS example:
git clone https://github.com/brocade/ansible
Step2: Add library path ANSIBLE_LIBRARY variable
BASH example:
if the repository is cloned under /home/myaccount/ansible,
export ANSIBLE_LIBRARY="/home/myaccount/ansible/library"
Step3: update ansible.cfg to point to utils directory for module_utils
Example available under ansible.cfg
Tower/AWX
tower_awx branch is now merged to master. Since playbooks and ansible.cfg are expected to be in the root directory for Tower/AWX, all playbooks and ansible.cfg are moved from tasks directory to root directory.
Usage
Step 1: create a project within AWX and choose
SCN TYPE to Git
SCM URL to https://github.com/brocade/ansible.git
Step 2: create an inventory.
Step 3: add a host to the inventory. Use san_eng_zone_seed_san_a in the host name field.
Step 4: add the following to the variables for the host.
ansible_connection: local
fos_ip_addr: <IP address of FOS switch>
fos_user_name: admin
fos_password: <FOS password for admin>
https: <False/True/self>
These variables are used by playbooks available when choosing the project created above to connect to FOS switch.
Connection to FOS
Primary connection to FOS for playbooks is FOS REST connection. However, Some playbook attributes use ssh connect to augment the fuctionality. When those attributes are specified in the playbooks, be sure that the FOS switch being used to connect is part of known hosts by where ansible-playbook is being executed or where AWX job is being executed.
Here are the examples of attributes using ssh.
Ansible module name |
Attributes |
---|---|
brocade_chassis |
telnet_timeout |
brocade_fibrechannel_configuration_fabric |
fabric_principal_enabled, fabric_principal_priority, in_order_delivery_enabled |
brocade_fibrechannel_configuration_n_port_configuration |
credit_recovery_mode |
brocade_fibrechannel_switch |
dynamic_load_sharing (pre 9.0 only) |
brocade_security_user_config |
account_enabled (pre 9.0 only) |
brocade_snmp |
host being set to 0.0.0.0 (pre 9.0 only) |
If host key check is to be turned off, ssh_hostkeymust field in credential variable should be set to false. Here is an example of how that can be done by defining credential variable in extra variables section for AWX job template.
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: "{{fos_user_name}}"
fos_password: "{{fos_password}}"
https: "{{fos_https}}"
ssh_hostkeymust: False
How to create playbooks
When creating Zoning playbooks, Zoning specific modules are used. This is to hide some of the Zoning specific operational complexities that would otherwise be exposed if using generic templates. However, most other REST FOS objects can be addressed by common template modules: brocade_single_obj and brocade_list_obj.
Zoning
Using brocade_zoning_alias, brocade_zoning_zone, and brocade_zoning_cfg modules, playbooks can be created to update Alias, Zone, or CFG in FOS Zoning database respectively.
When adding Alias, Zone or CFG, each module takes a list of entries. Each entry contains a name and a list of members. brocade_zoning_zone module can take principal_members in addition to members if you are interested in creating peer zones. During addition, entries are considered additive to the existing FOS Zoning database. In other word, if a playbook contains Aliases AAA and BBB and FOS Zoning database contained BBB and CCC before the execution of the playbook, the result of the playbook will contain Aliases AAA, BBB, and CCC. CCC is not removed even though it is not mentioned in the playbook.
Here is an example of a simple playbook of Alias to create Host1 Alias with two members and Target2 Alias with one member.
- name: Create aliases
brocade_zoning_alias:
credential:
fos_ip_addr: 10.10.10.10
fos_user_name: admin
fos_password: password
https: False
vfid: -1
aliases:
- name: Host1
members:
- aa:11:11:11:11:11:11:11
- aa:22:22:22:22:22:22:22
- name: Target2
members:
- aa:44:44:44:44:44:44:44
Alias, Zone, or CFG entry is deleted only if aliases_to_delete, zones_to_delete or cfgs_to_delete variable is provided with a list of Alises, Zones or CFGs to delete.
Here is an example of a simple playbook of Alias to delete Host1 and Target2.
- name: Delete aliases
brocade_zoning_alias:
credential:
fos_ip_addr: 10.10.10.10
fos_user_name: admin
fos_password: password
https: False
vfid: -1
aliases_to_delete:
- name: Host1
- name: Target2
Please refer to tasks/zoning_zone_delete.yml for additional reference.
Alias, Zone, or CFG entry addition and deletion are mutually exclusive.
Members to existing Alias, Zone or CFG entries are updated during a play if difference exists between a playbook and the existing FOS Zoning database. By default, members or principal_members are thought to be a full list and NOT additive. Thus resulting play of FOS Zoning database will contain the members defined in the playbook only. For example, if a playbook defines an Alias with members AAA and BBB and the Alias in FOS Zoning database contained BBB and CCC before the execution of the playbook, the result of the playbook will be an Alias with AAA and BBB. AAA was added and CCC was deleted.
However, if optional members_add_only variable is set to True for the task, the result of the previous playbook will be AAA, BBB, and CCC, where AAA is added and CCC remains.
Inversely, optional members_remove_only variable is set to True to specify removal of specific Alias, Zone, or CFG members.
Please refer to tasks/zoning_zone_add.yml for default behavior reference, tasks/zoning_zone_members_add_only.yml for members_add_only reference and tasks/zoning_zone_members_remove_only.yml for members_remove_only reference.
If interested in copying an existing Alias, Zone, or CFG to a new object, brocade_zoning_copy module is used. If any changes are detected in the Zoning object - for example, new member is added to a Zone - being copied from, the difference is newly applied to the destination object - i.e. the added member is added to the destination Zone if already created.
During execution, each module will update the define configuration and either save or enable CFG depending on if a CFG is already active on FOS. If any error is encountered, the changes are aborted and the FOS Zoning database will revert back to pre-task state.
An optional active_cfg variable is only applicable to brocade_zoning_cfg module. The variable is used to specify a CFG to be enabled.
Since Zoning modules are additive for entries by default, it is not necessary that the full Zoning database is refered in the playbooks. However, maintaining a full database in a playbook may be beneficial for certain use cases. To help, PyFOS based zoning_to_yml.py is provided to dump the existing FOS Zoning database in yml format. The screen output can be saved to a file and referenced in playbooks. Please refer to github.com/brocade/pyfos for PyFOS details and tasks/zonedb.yml and tasks/zoning_act.yml for reference.
Yang module/object specific Ansible modules
Here are the list of additional Ansible modules beyond Zoning. These modules typically take a dictionary or a list of dictionary. The dictionary contains attributes matching Yang REST leaf definitions. However, Ansible variables require underscore while hyphen is used in Yang REST leaf definitions. So, the attributes within the dictionary should match Yang REST leaf definition while replacing hyphen with underscore. i.e. my-leaf-name in Yang REST is converted to my_leaf_name within Ansible playbook.
Ansible module name |
Description |
---|---|
brocade_chassis.py |
update chassis attributes |
brocade_facts.py |
retrieve facts for specified areas |
brocade_fibrechannel_configuratio n_fabric.py |
update fabric configuration |
brocade_fibrechannel_configuratio n_port_configuration.py |
update port configuration |
brocade_fibrechannel_switch.py |
update switch configuration |
brocade_interface_fibrechannel.py |
update FC port configuration |
brocade_logging_audit.py |
update audit configuration |
brocade_logging_syslog_server.py |
update syslog server configuration |
brocade_maps_maps_config.py |
update MAPS configuration |
brocade_operation_show_status.py |
show status on operations initiated |
brocade_operation_supportsave.py |
initiate supportsave operation |
brocade_security_ipfilter_policy. py |
update ip filter policy |
brocade_security_ipfilter_rule.py |
update ip filter rule |
brocade_security_password.py |
update password. Passwords are given in clear text |
brocade_security_security_certifi cate_action.py |
import/export CSR/certificate |
brocade_security_security_certifi cate_generate.py |
generate CSR/certificate |
brocade_security_user_config.py |
update login accounts |
brocade_snmp_system.py |
update snmp system attributes |
brocade_snmp_v1_account.py |
update snmp v1 account |
brocade_snmp_v1_trap.py |
update snmp v1 trap |
brocade_snmp_v3_account.py |
update snmp v3 account |
brocade_snmp_v3_trap.py |
update snmp v3 trap |
brocade_time_clock_server.py |
update clock server configuration |
brocade_time_time_zone.py |
update time zone |
How to add attribute input to modules
As documented above, attributes passed to modules mirror Yang REST attribute name, except replacing “-” with “_” to aid Ansible convention. Most values assigned to these attributes also mirror Yang REST definition and details can be found in github.com/brocade/yang.
However, in some instances, attribute values are modified for both to maintain consistencies and to help with readability of playbooks.
Ansible module name |
Attribute name |
Value description |
---|---|---|
brocade_access_gatewa y_policy.py |
auto_policy_enabled |
boolean |
brocade_access_gatewa y_policy.py |
port_group_policy_ena bled |
boolean |
brocade_fibrechannel _switch.py |
enabled_state |
boolean |
brocade_interface_fib rechannel.py |
compression_configure d |
boolean |
brocade_interface_fib rechannel.py |
credit_recovery_enabl ed |
boolean |
brocade_interface_fib rechannel.py |
csctl_mode_enabled |
boolean |
brocade_interface_fib rechannel.py |
d_port_enable |
boolean |
brocade_interface_fib rechannel.py |
e_port_disable |
boolean |
brocade_interface_fib rechannel.py |
enabled_state |
boolean |
brocade_interface_fib rechannel.py |
encryption_enabled |
boolean |
brocade_interface_fib rechannel.py |
ex_port_enabled |
boolean |
brocade_interface_fib rechannel.py |
fault_delay_enabled |
boolean |
brocade_interface_fib rechannel.py |
fec_enabled |
boolean |
brocade_interface_fib rechannel.py |
g_port_locked |
boolean |
brocade_interface_fib rechannel.py |
isl_ready_mode_enable d |
boolean |
brocade_interface_fib rechannel.py |
long_distance |
Disabled/L0/L1/L2/LE/ L0.5/LD/LS |
brocade_interface_fib rechannel.py |
los_tov_mode_enabled |
Disabled/Fixed/FixedA uto |
brocade_interface_fib rechannel.py |
max_speed |
32Gig/16Gig/10Gig/8Gi g/4Gig/2Gig/1Gig/Auto |
brocade_interface_fib rechannel.py |
mirror_port_enabled |
boolean |
brocade_interface_fib rechannel.py |
n_port_enabled |
boolean |
brocade_interface_fib rechannel.py |
non_dfe_enabled |
boolean |
brocade_interface_fib rechannel.py |
npiv_enabled |
boolean |
brocade_interface_fib rechannel.py |
npiv_flogi_logout_ena bled |
boolean |
brocade_interface_fib rechannel.py |
persistent_disable |
boolean |
brocade_interface_fib rechannel.py |
port_autodisable_enab led |
boolean |
brocade_interface_fib rechannel.py |
qos_enabled |
boolean |
brocade_interface_fib rechannel.py |
rscn_suppression_enab led |
boolean |
brocade_interface_fib rechannel.py |
sim_port_enabled |
boolean |
brocade_interface_fib rechannel.py |
speed |
32Gig/16Gig/10Gig/8Gi g/4Gig/2Gig/1Gig/Auto |
brocade_interface_fib rechannel.py |
target_driven_zonin g_enable |
boolean |
brocade_interface_fib rechannel.py |
trunk_port_enabled |
boolean |
brocade_interface_fib rechannel.py |
vc_link_init |
boolean |
brocade_interface_fib rechannel.py |
via_tts_fec_enabled |
boolean |
brocade_security_pass word.py |
new_password |
clear text |
brocade_security_pass word.py |
old_password |
clear text |
brocade_security_secu rity_certificate_acti on.py |
remote_user_password |
clear text |
brocade_security_sshu til_public_key_action .py |
remote_user_password |
clear text |
brocade_security_se c_crypto_cfg_templat a_action.py |
remote_user_password |
clear text |
brocade_security_user _config.py |
password |
clear text |
brocade_snmp_v3_accou nt.py |
authentication_passwo rd |
clear text |
Template based Ansible modules
REST Yang objects that have yet been addressed by Yang module/object specific Ansible modules, template based Ansible modules can be used to address them temporarily. Although template based Ansible modules should generally work well with most REST Yang modules, some RET Yang objects specific may not be handled properly. So, it is recommended that Yang module/object specific Ansible modules be used preferably.
Singleton object
A singleton object refers to a FOS REST object that is only one of the kind on FOS switch. Yang definition of container is used to define this type of object. Using the Yang definition and brocade_singleton_obj module, playbooks can be created to update the object.
All the Yang REST FOS models are published in github.com/brocade/yang.
For example, brocade-chassis module contains an object named chassis. And chassis object contains a string type leaf named chassis-user-friendly-name, amoung other attributes.
module brocade-chassis {
container brocade-chassis {
container chassis {
leaf chassis-user-friendly-name {
}
}
}
}
To create a playbook to set chassis-user-friendly-name to XYZ is created by:
use brocade_singleton_obj module
provide the module_name to match the Yang REST FOS module name - brocade-chassis or brocade_chassis. “-” and “_” are interchangable as module_name.
provide the obj_name to match the Yang REST FOS object name - chassis. As with module_name, “-” and “_” are interchangable as obj_name.
provide leaf entry within attributes. Only one - chassis-user-friendly-name - is being referenced for the moment. Since Ansible variable should not contain “-”, they are placed by “-”.
- name: chassis configuration
brocade_singleton_obj:
credential:
fos_ip_addr: 10.10.10.10
fos_user_name: admin
fos_password: password
https: False
vfid: -1
module_name: "brocade_chassis"
obj_name: "chassis"
attributes:
chassis_user_friendly_name: XYZ
Playing the above playbook to set the chassis-user-friendly-name to XYZ if different or return no change if already set to XYZ.
Although the module should apply to all objects in general, the following are the list of modules and objects that have been verified based on the playbooks under tasks directory
module name |
object name |
---|---|
brocade_chassis |
chassis |
brocade_fibrechannel_configuration |
fabric |
brocade_fibrechannel_configuration |
port_configuration |
brocade_logging |
audit |
brocade-maps |
maps-config |
brocade-security |
password |
brocade-snmp |
system |
brocade_time |
clock_server |
brocade_time |
time_zone |
List object
A list object refers to a FOS REST object that can contain multiple entries on FOS switch. Yang definition of list is used to define this type of object. Using the Yang definition and brocade_list_obj module, playbooks can be created to create, update, or delete the object.
All the Yang REST FOS models are published in github.com/brocade/yang.
For example, brocade-snmp module contains an object named v1-account. And v1-account object contains a key named index and a string type leaf named community-name, among other attributes.
module brocade-snmp {
container brocade-snmp {
list v1-account {
key "index";
leaf index {
}
leaf community-name {
}
}
}
}
To create a playbook to set community-name to XYZ for an entry with index of 1, and ZYX for index of 2:
use brocade_list_obj module
provide the module_name to match the Yang REST FOS module name - brocade-snmp or brocade_snmp. “-” and “_” are interchangable as module_name.
provide the list_name to match the Yang REST FOS object name - v1-account or v1_account. As with module_name, “-” and “_” are interchangable as list_name.
provide an array within entries. Only key and community_string are being referenced for the moment. Since Ansible variable should not contain “-”, they are placed by “-”.
if the array contains all the entries, all_entries variable can be left out or set to True. If so, entries in playbook but not in FOS are added, entries in both playbook and FOS are updated if different, and entries not in playbook but in FOS are deleted. If the array contains only subset of all entries, only addition and update are performed.
- name: snmp configuration
brocade_list_obj:
credential:
fos_ip_addr: 10.10.10.10
fos_user_name: admin
fos_password: password
https: False
vfid: -1
module_name: "brocade_snmp"
obj_name: "v1_account"
all_entries: False
entries:
- index: 1
community_name: XYZ
- index: 2
community_name: ZYX
Playing the above playbook to set the community name for two entries. Rest of the entries already exist on FOS are untouched.
Although the module should apply to all objects in general, the following are the list of modules and objects that have been verified based on the playbooks under tasks directory
module name |
list name |
---|---|
brocade_fibrechannel_switch |
fibrechannel_switch |
brocade-interface |
fibrechannel |
brocade_logging |
syslog_server |
brocade-name-server |
fibrechannel-name-server |
brocade-snmp |
v1-account |
brocade-snmp |
v1-trap |
brocade-snmp |
v3-account |
brocade-snmp |
v3-trap |
brocade_security |
user_config |
brocade-security |
ipfilter-rule |
Documentation
Documentation can be generated by following the instructions mentioned in the ./docs/documentation.rst or from the link below: https://github.com/brocade/ansible/blob/master/docs/documentation.rst
Contact
Automation.BSN@broadcom.com
Modules
brocade_access_gateway_n_port_map
Brocade Fibre Channel AG N-Port map configuration
Synopsis
Update Fibre Channel AG N-Port map configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
n_port_map: List of N-Port map to be updated. All writable attributes supported by BSN REST API. Attribute name containing “-” is replaced with “_”.
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: configure N-Port map
brocade_access_gateway_n_port_map:
credential: "{{credential}}"
vfid: -1
n_port_map:
Return Values
msg: Success message
returned: on success
type: str
brocade_access_gateway_n_port_settings
Brocade Fibre Channel AG N-Port settings
Synopsis
Update Fibre Channel AG N-Port settings
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
n_port_settings: N-Port settings data structure All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: AG N-Port settings
brocade_access_gateway_n_port_settings
credential: "{{credential}}"
vfid: -1
n_port_settings:
reliability_counter: 25
Return Values
msg: Success message
returned: success
type: str
brocade_access_gateway_policy
Brocade Fibre Channel AG policy configuration
Synopsis
Update Fibre Channel AG policy configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
force: When enabling auto policy, switch is disabled, pg policy is disabled, auto policy is enabled, and switch is enabled. When enabling pg policy, switch is disabled, auto policy is disabled, and switch is enabled. If both policies are specified in the playbook, only the first entry is processed. Pause statement can be used to delay subsequent tasks to be executed prior to switch online while executing multiple tasks from the same playbook.
required: False
type: bool
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: AG policy
brocade_access_gateway_policy
credential: "{{credential}}"
vfid: -1
policy:
port_group_policy_enabled: True
auto_policy_enabled: False
Return Values
msg: Success message
returned: success
type: str
brocade_access_gateway_port_group
Brocade Fibre Channel AG port group configuration
Synopsis
Update Fibre Channel AG port group configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
port_groups: List of port groups be updated. All writable attributes supported by BSN REST API with - replaced with _
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: snmp v3 traps
brocade_access_gateway_port_group:
credential: "{{credential}}"
vfid: -1
port_groups:
Return Values
msg: Success message
returned: success
type: str
brocade_chassis
Brocade Fibre Channel chassis configuration
Synopsis
Update Fibre Channel chassis configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
chassis: List of chassis attributes. All writable attributes supported by BSN REST API with - replaced with _. Some examples are - chassis_user_friendly_name - chassis name in string
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: initial chassis configuration
brocade_chassis:
credential: "{{credential}}"
vfid: -1
chassis:
chassis_user_friendly_name: "chassis_name"
telnet_timeout: 30
Return Values
msg: Success message
returned: success
type: str
brocade_fabric_switch_facts_by_pid
Brocade Fibre Channel switch find by connected device’s pid
Synopsis
Fibre Channel switch find by connected device’s PID
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: False
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
pid: Pid of the device
required: True
type: str
Examples
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
pid_to_search: "0x140000"
tasks:
- name: gather device alias info
brocade_fabric_switch_facts_by_pid:
credential: "{{credential}}"
vfid: -1
pid: "{{pid_to_search}}"
- name: print fabric switch information matching pid
debug:
var: ansible_facts['fabric_switch']
when: ansible_facts['fabric_switch'] is defined
Return Values
msg: Success message
returned: success
type: str
brocade_facts
Brocade Fibre Channel facts gathering
Synopsis
Gather FOS facts
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
gather_subset: List of areas to be gathered. If this option is missing, all areas’ facts will be gathered. Same behavior applies if “all” is listed as part of gather_subset.
required: False
type: list
choices:
allbrocade_access_gateway_port_groupbrocade_access_gateway_n_port_mapbrocade_access_gateway_f_port_listbrocade_access_gateway_device_listbrocade_access_gateway_policybrocade_access_gateway_n_port_settingsbrocade_zoningbrocade_interface_fibrechannelbrocade_chassis_chassisbrocade_fibrechannel_configuration_fabricbrocade_fibrechannel_configuration_port_configurationbrocade_fibrechannel_switchbrocade_fibrechannel_trunk_trunkbrocade_fibrechannel_trunk_performancebrocade_fibrechannel_trunk_trunk_areabrocade_time_clock_serverbrocade_time_time_zonebrocade_logging_syslog_serverbrocade_logging_auditbrocade_media_media_rdpbrocade_snmp_systembrocade_security_ipfilter_rulebrocade_security_ipfilter_policybrocade_security_user_configbrocade_security_password_cfgbrocade_security_security_certificatebrocade_snmp_v1_accountbrocade_snmp_v1_trapbrocade_snmp_v3_accountbrocade_snmp_v3_trapbrocade_maps_maps_configbrocade_security_sec_crypto_cfg_template_actionbrocade_security_sshutil_public_keybrocade_security_ldap_role_map
Examples
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
tasks:
- name: gather facts
brocade_facts:
credential: "{{credential}}"
vfid: -1
gather_subset:
- brocade_access_gateway_port_group
- brocade_access_gateway_n_port_map
- brocade_access_gateway_f_port_list
- brocade_access_gateway_device_list
- brocade_access_gateway_policy
- brocade_access_gateway_n_port_settings
- brocade_zoning
- brocade_interface_fibrechannel
- brocade_chassis_chassis
- brocade_fibrechannel_configuration_fabric
- brocade_fibrechannel_configuration_port_configuration
- brocade_fibrechannel_switch
- brocade_time_clock_server
- brocade_time_time_zone
- brocade_logging_syslog_server
- brocade_logging_audit
- brocade_snmp_system
- brocade_security_ipfilter_rule
- brocade_security_ipfilter_policy
- brocade_security_user_config
- brocade_snmp_v1_account
- brocade_snmp_v1_trap
- brocade_snmp_v3_account
- brocade_snmp_v3_trap
- brocade_maps_maps_config
- brocade_security_sec_crypto_cfg_template_action
- brocade_security_sshutil_public_key
- brocade_security_ldap_role_map
- name: print ansible_facts gathered
debug:
var: ansible_facts
Return Values
msg: Success message
returned: success
type: str
brocade_fibrechannel_configuration_fabric
Brocade Fibre Channel fabric configuration
Synopsis
Update Fibre Channel fabric configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
fabric: List of fabric configuraiton attributes. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: any
Notes
Note
Specifying either fabric_principal_enabled and fabric_principal_priority may lead to failures.Both of them need to be specified in the playbook. Examples are insistent_domain_id_enabled - indicate if insistent domain id feature is enabled
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: initial fabric configuration
brocade_fibrechannel_configuration_fabric:
credential: "{{credential}}"
vfid: -1
fabric:
insistent_domain_id_enabled: True
in_order_delivery_enabled: False
fabric_principal_enabled: True
fabric_principal_priority: "0x3"
register: result
- debug: var=result
Return Values
msg: Success message
returned: success
type: str
brocade_fibrechannel_configuration_port_configuration
Brocade Fibre Channel port Configuration
Synopsis
Update Fibre Channel port configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
port_configuration: List of port configuraiton attributes. All writable attributes supported by BSN REST API with - replaced with _. Some examples are - portname_mode - portname mode such as dynamic, default, etc.
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: initial port configuration
brocade_fibrechannel_configuration_port_configuration:
credential: "{{credential}}"
vfid: -1
port_configuration:
dynamic_portname_format: "I.T.A.R"
portname_mode: "dynamic"
Return Values
msg: Success message
returned: success
type: str
brocade_fibrechannel_logical_switch_fibrechannel_logical_switch
Brocade logical Configuration
Synopsis
Update logging audit configuration.
Parameters
credential: login information including fos_ip_addr - ip address of the FOS switch fos_user_name - login name of FOS switch REST API fos_password - password of FOS switch REST API https - True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: dict
vfid: vfid of the switch to target. The value can be -1 for FOS without VF enabled. For VF enabled FOS, a valid vfid should be given
required: False
type: any
throttle: rest throttling delay in seconds to retry once more if server is busy.
required: False
type: any
timeout: rest timeout in seconds for operations taking longer than default timeout.
required: False
type: any
all_entries: Boolean to indicate if the entries specified are full list of objects or not. By default, all_entries are thought to be true if not specified. If all_entries is set to true, the entries is used to calculate the change of existing entryies, addition, and deletion. If all_entries is set to false, the entries is used to calculate the change of existing entries and addition of entries only. i.e. the module will not attempt to delete objects that do not show up in the entries.
required: False
type: any
logical_switches: list of logical switch data structure All writable attributes supported by BSN REST API with - replaced with _. All of non-default switches are required. No default switch data should be present.
required: True
type: any
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: initial syslog configuration
brocade_fibrechannel_logical_switch_fibrechannel_logical_switch:
credential: "{{credential}}"
vfid: -1
logical_switches:
- fabric_id: 1
base_switch_enabled: 0
ficon_mode_enabled: 0
logical_isl_enabled: 1
port_member_list:
port_member:
- "0/1"
- "0/2"
Return Values
msg: Success message
returned: success
type: str
brocade_fibrechannel_switch
Brocade Fibre Channel switch configuration
Synopsis
Update Fibre Channel switch configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
switch: List of switch attributes. All writable attributes supported by BSN REST API with - replaced with _. Some examples are - user_friendly_name - switch name in string - fabric_user_friendly_name - fabric name in string - banner - login banner in string - domain_id - set the domain id of the switch
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
ssh_hostkeymust - hostkeymust arguement for ssh attributes only. Default True.
tasks:
- name: disable switch before setting insistent domain id mode and domain id set
brocade_fibrechannel_switch:
credential: "{{credential}}"
vfid: -1
switch:
enabled_state: False
- name: initial switch configuration
brocade_fibrechannel_switch:
credential: "{{credential}}"
vfid: -1
switch:
user_friendly_name: "switch_name"
fabric_user_friendly_name: "fabric_name"
domain_id: 1
banner: "AUTHORIZED USERS ONLY!"
dynamic_load_sharing: "lossless-dls"
domain_name: "yahoo.com"
dns_servers:
dns_server:
- "8.8.8.8"
- "8.8.4.4"
- name: enable switch after setting insistent domain id mode
brocade_fibrechannel_switch:
credential: "{{credential}}"
vfid: -1
switch:
enabled_state: True
Return Values
msg: Success message
returned: success
type: str
brocade_interface_fibrechannel
Brocade Fibre Channel port configuration
Synopsis
Update Fibre Channel port configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
ports: List of ports to be updated. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: Configure ports
brocade_interface_fibrechannel:
credential: "{{credential}}"
vfid: -1
ports:
- name: "0/0"
enabled_state: False
npiv_pp_limit: 126
- name: "0/1"
persistent_disable: True
Return Values
msg: Success message
returned: success
type: str
brocade_list_obj
Brocade Fibre Channel general list processing
Synopsis
Update Fibre Channel list of objects based on module name and list name provided
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
module_name: Yang module name. Hyphen or underscore are used interchangebly. If the Yang module name is xy-z, either xy-z or xy_z are acceptable.
required: True
type: str
list_name: Yang name for the list object. Hyphen or underscore are used interchangebly. If the Yang list name is xy-z, either xy-z or xy_z are acceptable.
required: True
type: str
all_entries: Boolean to indicate if the entries specified are full list of objects or not. By default, all_entries are thought to be true if not specified. If all_entries is set to true, the entries is used to calculate the change of existing entryies, addition, and deletion. If all_entries is set to false, the entries is used to calculate the change of existing entries and addition of entries only. i.e. the module will not attempt to delete objects that do not show up in the entries.
required: False
type: bool
entries: List of objects. Name of each attributes within each entries should match the Yang name except hyphen is replaced with underscore. Using hyphen in the name may result in errenously behavior based on Ansible parsing.
required: True
type: list
delete_entries: name of the entries to be deleted. mutually exclusive with entries.
required: False
type: any
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: list object example
brocade_list_obj:
credential: "{{credential}}"
vfid: -1
module_name: "brocade-snmp"
list_name: "v1-account"
all_entries: False
entries:
- index: 1
community_name: "new name"
Return Values
msg: Success message
returned: success
type: str
brocade_list_obj_facts
Brocade Fibre Channel generic facts gathering for list objects
Synopsis
Gather Fibre Channel FOS facts for objects that are defined as list in Yang
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
module_name: Yang module name. Hyphen or underscore are used interchangebly. If the Yang module name is xy-z, either xy-z or xy_z are acceptable.
required: True
type: str
obj_name: Yang name for the list object. Hyphen or underscore are used interchangebly. If the Yang list name is xy-z, either xy-z or xy_z are acceptable.
required: True
type: str
attributes: List of attributes for the object to match to return. Names match Yang rest attributes with “-” replaced with “_”. If none is given, the module returns all valid entries. Using hyphen in the name may result in errenously behavior based on Ansible parsing.
required: optional
type: dict
Examples
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
wwn_to_search: "11:22:33:44:55:66:77:88"
tasks:
- name: gather device info
brocade_list_obj_facts:
credential: "{{credential}}"
vfid: -1
module_name: "brocade-name-server"
list_name: "fibrechannel-name-server"
attributes:
port_name: "{{wwn_to_search}}"
- name: print ansible_facts gathered
debug:
var: ansible_facts
Return Values
msg: Success message
returned: success
type: str
brocade_logging_audit
Brocade Fibre Channel loggig audit configuration
Synopsis
Update Fibre Channel logging audit configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
audit: Audit config data structure. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: initial audit configuration
brocade_logging_audit:
credential: "{{credential}}"
vfid: -1
audit:
audit_enabled: True
filter_class_list:
filter_class:
- "zone"
- "security"
- "configuration"
- "firmware"
- "fabric"
- "ls"
- "cli"
- "maps"
severity_level: "info"
Return Values
msg: Success message
returned: success
type: str
brocade_logging_syslog
Brocade Fibre Channel loggig syslog server configuration
Synopsis
Update Fibre Channel logging audit configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
all_entries: Boolean to indicate if the entries specified are full list of objects or not. By default, all_entries are thought to be true if not specified. If all_entries is set to true, the entries is used to calculate the change of existing entryies, addition, and deletion. If all_entries is set to false, the entries is used to calculate the change of existing entries and addition of entries only. i.e. the module will not attempt to delete objects that do not show up in the entries.
required: False
type: bool
syslog_servers: List of syslog server config data structure. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: initial syslog configuration
brocade_logging_syslog_server:
credential: "{{credential}}"
vfid: -1
syslog_servers:
- port: 514
secure_mode: False
server: "10.155.2.151"
Return Values
msg: Success message
returned: success
type: str
brocade_maps_maps_config
Brocade Fibre Channel MAPS configuration
Synopsis
Update Fibre Channel MAPS configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
maps_config: List of MAPS configuration attributes. All writable attributes supported by BSN REST API with - replaced with _. Some examples are - description - description string
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: configure relay server
brocade_maps_maps_config:
credential: "{{credential}}"
vfid: -1
maps_config:
relay_ip_address: "10.10.10.10"
domain_name: "d.com"
sender_address: "s@d.com"
recipient_address_list:
recipient_address:
- "r@d.com"
- "r@r.com"
Return Values
msg: Success message
returned: success
type: str
brocade_maps_maps_policy
Brocade Fibre Channel MAPS policy configuration
Synopsis
Update Fibre Channel MAPS policy
Parameters
credential: login information including fos_ip_addr - ip address of the FOS switch fos_user_name - login name of FOS switch REST API fos_password - password of FOS switch REST API https - True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: dict
vfid: vfid of the switch to target. The value can be -1 for FOS without VF enabled. For VF enabled FOS, a valid vfid should be given
required: False
type: any
throttle: rest throttling delay in seconds to retry once more if server is busy.
required: False
type: any
timeout: rest timeout in seconds for operations taking longer than default timeout.
required: False
type: any
maps_policies: list of policies to be updated. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: any
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: maps policies
brocade_maps_maps_policy:
credential: "{{credential}}"
vfid: -1
map_policies:
- name: my_policy
is_active_policy: False
rule_list:
rule:
- my_rule1
- my_rule2
Return Values
msg: Success message
returned: success
type: str
brocade_maps_rule
Brocade Fibre Channel MAPS rule configuration
Synopsis
Update Fibre Channel MAPS rule
Parameters
credential: login information including fos_ip_addr - ip address of the FOS switch fos_user_name - login name of FOS switch REST API fos_password - password of FOS switch REST API https - True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: dict
vfid: vfid of the switch to target. The value can be -1 for FOS without VF enabled. For VF enabled FOS, a valid vfid should be given
required: False
type: any
throttle: rest throttling delay in seconds to retry once more if server is busy.
required: False
type: any
timeout: rest timeout in seconds for operations taking longer than default timeout.
required: False
type: any
rules: list of rules to be updated. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: any
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: configure maps rules
brocade_maps_rule:
credential: "{{credential}}"
vfid: -1
rules:
- name: my_rule1
actions:
action:
- "raslog"
event_severity: null
group_name: "ALL_E_PORTS"
is_rule_on_rule: False
logical_operator: "g"
monitoring_system: "C3TXTO"
quiet_time: 0
threshold_value: 1
time_base: "Min"
Return Values
msg: Success message
returned: success
type: str
brocade_operation_firmwaredownload
Brocade Fibre Channel operation firmwaredownload
Synopsis
Initiate Fibre Channel firmwaredownload
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
firmwaredownload: Firmware parameters
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: initiate firmwaredownload
brocade_operation_firmwaredownload:
credential: "{{credential}}"
vfid: -1
firmwaredownload:
host:
user_name:
password:
remote_directory:
protocol:
port:
stage:
activate:
Return Values
msg: Success message
returned: success
type: str
brocade_operation_show_status
Brocade Fibre Channel operation status retrieval
Synopsis
Retrieve Fibre Channel operation status
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
show_status: Message id information
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: show operation status
brocade_operation_show_status:
credential: "{{credential}}"
vfid: -1
show_status:
message_id:
Return Values
msg: Success message
returned: success
type: str
brocade_operation_supportsave
Brocade Fibre Channel operation supportsave
Synopsis
Initiate Fibre Channel supportsave operation
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
supportsave: Supportsave parameters
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: Initiate supportsave
brocade_operation_supportsave:
credential: "{{credential}}"
vfid: -1
supportsave:
host:
user_name:
password:
remote_directory:
protocol:
port:
Return Values
msg: Success message
returned: success
type: str
brocade_security_ipfilter_policy
Brocade Fibre Channel security ipfilter policy configuration
Synopsis
Update Fibre Channel security ipfilter policy configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
ipfilter_policies: List of ipfilter policies data structure. All writable attributes supported by BSN REST API with - replaced with _.
required: False
type: list
active_policy: Name of the active policy. Mutually exclusive with ipfilter_policies and delete_policy. This shoud come after policies are created and filled with rules
required: False
type: str
delete_policies: Name of the policy to be deleted. Mutually exclusive with ipfilter_policies and active_policy.
required: False
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
tasks:
- name: activate default ipv4 before deleting previously created custom policy
brocade_security_ipfilter_policy:
credential: "{{credential}}"
vfid: -1
active_policy: "default_ipv4"
- name: delete custom policy
brocade_security_ipfilter_policy:
credential: "{{credential}}"
vfid: -1
delete_policies:
- name: "ipv4_telnet_http"
Return Values
msg: Success message
returned: success
type: str
brocade_security_ipfilter_rule
Brocade Fibre Channel security ipfilter rule Configuration
Synopsis
Update Fibre Channel secuirty ipfilter rule configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
ipfilter_rules: List of ipfilter rules data structure. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
tasks:
- name: ipfilter policy is created or present
brocade_security_ipfilter_policy:
credential: "{{credential}}"
vfid: -1
ipfilter_policies:
- name: "ipv4_telnet_http"
ip_version: "IPv4"
- name: ipfilter rules are created or present
brocade_security_ipfilter_rule:
credential: "{{credential}}"
vfid: -1
ipfilter_rules:
- policy_name: "ipv4_telnet_http"
index: 1
destination_end_port: 22
destination_ip: "any"
destination_start_port: 22
permission: "permit"
protocol: "tcp"
source_ip: "any"
traffic_type: "INPUT"
- policy_name: "ipv4_telnet_http"
index: 2
destination_end_port: 23
destination_ip: "any"
destination_start_port: 23
permission: "deny"
protocol: "tcp"
source_ip: "any"
traffic_type: "INPUT"
- policy_name: "ipv4_telnet_http"
index: 3
destination_end_port: 80
destination_ip: "any"
destination_start_port: 80
permission: "permit"
protocol: "tcp"
source_ip: "any"
traffic_type: "INPUT"
- policy_name: "ipv4_telnet_http"
index: 4
destination_end_port: 443
destination_ip: "any"
destination_start_port: 443
permission: "permit"
protocol: "tcp"
source_ip: "any"
traffic_type: "INPUT"
- policy_name: "ipv4_telnet_http"
index: 5
destination_end_port: 161
destination_ip: "any"
destination_start_port: 161
permission: "permit"
protocol: "udp"
source_ip: "any"
traffic_type: "INPUT"
- policy_name: "ipv4_telnet_http"
index: 6
destination_end_port: 123
destination_ip: "any"
destination_start_port: 123
permission: "permit"
protocol: "udp"
source_ip: "any"
traffic_type: "INPUT"
- policy_name: "ipv4_telnet_http"
index: 7
destination_end_port: 1023
destination_ip: "any"
destination_start_port: 600
permission: "permit"
protocol: "tcp"
source_ip: "any"
traffic_type: "INPUT"
- policy_name: "ipv4_telnet_http"
index: 8
destination_end_port: 1023
destination_ip: "any"
destination_start_port: 600
permission: "permit"
protocol: "udp"
source_ip: "any"
traffic_type: "INPUT"
- policy_name: "ipv4_telnet_http"
index: 9
destination_end_port: 389
destination_ip: "any"
destination_start_port: 389
permission: "permit"
protocol: "tcp"
source_ip: "any"
traffic_type: "INPUT"
- policy_name: "ipv4_telnet_http"
index: 10
destination_end_port: 389
destination_ip: "any"
destination_start_port: 389
permission: "permit"
protocol: "udp"
source_ip: "any"
traffic_type: "INPUT"
- name: ipfilter policy is activated or active already
brocade_security_ipfilter_policy:
credential: "{{credential}}"
vfid: -1
active_policy: "ipv4_telnet_http"
Return Values
msg: Success message
returned: success
type: str
brocade_security_ldap_role_map
Brocade Fibre Channel security LDAP role map configuration
Synopsis
Update Fibre Channel secuirty LDAP role map configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
ldap_role_map: List of LDAP roles data structure. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
tasks:
- name: LDAP role map
brocade_security_ldap_role_map:
credential: "{{credential}}"
vfid: -1
ldap_role_map:
- ldap_role: "ROLEXYZ"
switch_role: "admin"
Return Values
msg: Success message
returned: success
type: str
brocade_security_password
Brocade Fibre Channel security password change
Synopsis
Update password for a given user
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
password: Password change attributes. - user_name - name of the account. - old_password - old password in clear text. - new_password - new password in clear text.
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: change password
brocade_security_password:
credential: "{{credential}}"
vfid: -1
password:
user_name: user
old_password: oldpassword
new_password: newpassword
Return Values
msg: Success message
returned: success
type: str
brocade_security_sec_crypto_template_action
Brocade Fibre Channel security crypto template file actions
Synopsis
Use to perform actions on the crypto template files. The module performs the action each time and is not idempotent.
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
action_inputs: Action attributes
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: import/export/apply cfg template
brocade_security_sec_crypto_cfg_template_action
credential: "{{credential}}"
vfid: -1
action_inputs:
Return Values
msg: Success message
returned: success
type: str
brocade_security_security_certificate_action
Brocade Fibre Channel third-party certificate installation
Synopsis
Use to import or export certificate
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
action_inputs: Action attributes
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: import or export certificate
brocade_security_security_certificate_action:
credential: "{{credential}}"
vfid: -1
action_inputs:
Return Values
msg: Success message
returned: success
type: str
brocade_security_security_certificate_generate
Brocade Fibre Channel security CSR or certificate generation like HTTPS, LDAP, etc
Synopsis
Use to generate CSR or certificate
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
generate_inputs: Attributes used to generate CSR or CERT
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: CSR or certificate generation
brocade_security_security_certificate_generate:
credential: "{{credential}}"
vfid: -1
generate_inputs:
Return Values
msg: Success message
returned: success
type: str
brocade_security_ssh_public_key
Brocade Fibre Channel security ssh public key delete
Synopsis
Use to delete public key
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
delete_sshutil_public_key: List of user names to delete the keys
required: False
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxx
https: False
tasks:
- name: delete public key for admin
brocade_security_user_config:
credential: "{{credential}}"
vfid: -1
delete_sshutil_public_key:
- user-name: "admin"
Return Values
msg: Success message
returned: success
type: str
brocade_security_sshutil_public_key_action
Brocade Fibre Channel public key export or import
Synopsis
Use to export or import public keys
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
action_inputs: Action attributes
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: public key import or export
brocade_security_sshutil_public_key_action:
credential: "{{credential}}"
vfid: -1
action_inputs:
Return Values
msg: Success message
returned: success
type: str
brocade_security_user_config
Brocade Fibre Channel security user configuration
Synopsis
Update Fibre Channel security user configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
user_configs: List of user config data structure. All writable attributes supported by BSN REST API with - replaced with _.
required: False
type: list
delete_user_configs: List of user config data structure to be deleted
required: False
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxx
https: False
tasks:
- name: disable root & user
brocade_security_user_config:
credential: "{{credential}}"
vfid: -1
user_configs:
- name: "user"
account_enabled: False
- name: "root"
account_enabled: False
- name: add new account
brocade_security_user_config:
credential: "{{credential}}"
vfid: -1
user_configs:
- name: "myaccount"
password: "bXlwYXNzd29yZA=="
virtual_fabric_role_id_list:
role_id:
- "admin=1-128"
chassis_access_role: "admin"
- name: "youraccount"
password: "bXlwYXNzd29yZA=="
virtual_fabric_role_id_list:
role_id:
- "admin=1-128"
chassis_access_role: "admin"
- name: delete accounts
brocade_security_user_config:
credential: "{{credential}}"
vfid: -1
delete_user_configs:
- name: "myaccount"
- name: "youraccount"
Return Values
msg: Success message
returned: success
type: str
brocade_singleton_obj
Brocade Fibre Channel generic handler for singleton object
Synopsis
Update list of attributes based on module name and object name provided
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
module_name: Yang module name. Hyphen or underscore are used interchangebly. If the Yang module name is xy-z, either xy-z or xy_z are acceptable.
required: True
type: str
obj_name: Yang name for the object. Hyphen or underscore are used interchangebly. If the Yang list name is xy-z, either xy-z or xy_z are acceptable.
required: True
type: str
attributes: List of attributes for the object. names match rest attributes with “-” replaced with “_”. Using hyphen in the name may result in errenously behavior based on ansible parsing. - Special node for “brocade-security” module “password” object “old_password” and “new_password” are in plain text. If “user_name” is user account, only “new_password” is needed.
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: change password
brocade_singleton_obj:
credential: "{{credential}}"
vfid: -1
module_name: "brocade-security"
obj_name: "password"
attributes:
user_name: "user"
new_password: "xxxx"
old_password: "yyyy"
Return Values
msg: Success message
returned: success
type: str
brocade_singleton_obj_facts
Brocade Fibre Channel generic facts gathering for singleton objects
Synopsis
Gather Fibre Channel FOS facts for singleon obj
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
module_name: Yang module name. Hyphen or underscore are used interchangebly. If the Yang module name is xy-z, either xy-z or xy_z are acceptable.
required: True
type: str
obj_name: Yang name for the object. Hyphen or underscore are used interchangebly. If the Yang list name is xy-z, either xy-z or xy_z are acceptable.
required: True
type: str
Examples
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
tasks:
- name: gather device info
brocade_list_obj_facts:
credential: "{{credential}}"
vfid: -1
module_name: "brocade-snmp"
obj_name: "system"
- name: print ansible_facts gathered
debug:
var: ansible_facts
Return Values
msg: Success message
returned: success
type: str
brocade_snmp_system
Brocade Fibre Channel SNMP system configuration
Synopsis
Update Fibre Channel SNMP system configuration.
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
snmp_system: List of snmp system attributes. All writable attributes supported by BSN REST API with - replaced with _. Some examples are - description - Description string
required: True
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: initial snmp system configuration
brocade_snmp_system:
credential: "{{credential}}"
vfid: -1
snmp_system:
audit_interval: 60
contact: "Field Support."
description: "DemoSwitch"
encryption_enabled: False
informs_enabled: False
location: "San Jose"
security_get_level: 0
security_set_level: 3
snmpv1_enabled: True
Return Values
msg: Success message
returned: success
type: str
brocade_snmp_v1_account
Brocade Fibre Channel SNMP v1 account configuration
Synopsis
Update Fibre Channel SNMP v1 account
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
v1_accounts: List of v1 accounts to be updated. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: snmp v1 accounts
brocade_snmp_v1_account:
credential: "{{credential}}"
vfid: -1
v1_accounts:
- index: 1
community_name: "secret code"
- index: 2
community_name: "oem"
Return Values
msg: Success message
returned: success
type: str
brocade_snmp_v1_trap
Brocade Fibre Channel SNMP v1 trap configuration
Synopsis
Update Fibre Channel SNMP v1 trap
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
v1_traps: List of v1 traps to be updated. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: snmp v1 traps
brocade_snmp_v1_trap:
credential: "{{credential}}"
vfid: -1
v1_traps:
- index: 1
host: "10.10.10.10"
port_number: 1010
trap_severity_level: "warning"
Return Values
msg: Success message
returned: success
type: str
brocade_snmp_v3_account
Brocade Fibre Channel SNMP v3 account configuration
Synopsis
Update Fibre Channel SNMP v3 account
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
v3_accounts: List of v3 accounts to be updated. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: snmp v3 accounts
brocade_snmp_v3_account:
credential: "{{credential}}"
vfid: -1
v3_accounts:
- index: 1
authentication_protocol: "md5"
manager_engine_id: "00:00:00:00:00:00:00:00:00"
privacy_protocol: "aes128"
user_name: "asc-test"
- index: 2
authentication_protocol: "sha"
manager_engine_id: "00:00:00:00:00:00:00:00:00"
privacy_protocol: "des"
user_name: "snmpadmin2"
Return Values
msg: Success message
returned: success
type: str
brocade_snmp_v3_trap
Brocade Fibre Channel SNMP v3 trap configuration
Synopsis
Update Fibre Channel SNMP v3 trap
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
v3_traps: List of v3 traps to be updated. All writable attributes supported by BSN REST API with - replaced with _.
required: True
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: snmp v3 traps
brocade_snmp_v3_trap:
credential: "{{credential}}"
vfid: -1
v3_traps:
- trap_index: 1
host: "10.10.10.11"
informs_enabled: true
port_number: 1011
trap_severity_level: "warning"
usm_index: 1
Return Values
msg: Success message
returned: success
type: str
brocade_time_clock_server
Brocade Fibre Channel time clock server configuration
Synopsis
Update time clock server configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
clock_server: Clock server data structure containing ntp servers. WARNING - If ntp servers are not reachable, the operation may result in time out and playbook returning failure. All writable attributes supported by BSN REST API with - replaced with _.
required: False
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: initial clock server configuration
brocade_time_clock_server:
credential: "{{credential}}"
vfid: -1
clock_server:
ntp_server_address:
server_address:
- "10.38.2.80"
- "10.38.2.81"
Return Values
msg: Success message
returned: success
type: str
brocade_time_time_zone
Brocade Fibre Channel time zone configuration
Synopsis
Update time zone configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
time_zone: Time zone data structure. All writable attributes supported by BSN REST API with - replaced with _.
required: False
type: dict
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: xxxx
https: False
tasks:
- name: initial time zone configuration
brocade_time_time_zone:
credential: "{{credential}}"
vfid: -1
time_zone:
name: "America/Chicago"
Return Values
msg: Success message
returned: success
type: str
brocade_zoning_alias
Brocade Fibre Channel zoning alias configuration
Synopsis
Create, detroy, or update aliases. The whole of aliases and aliases_to_delete are applied to FOS within a single login session to termininate after the completion. If no active cfg is found, cfgsave is executed before the completion of the session. If an active cfg is found, cfgenable of the existing cfg is executed to apply any potential changes before the completion of the session.
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
aliases: List of aliases to be created or modified. If an alias does not exist in the current Zone Database, the alias will be created with the members specified. If an alias already exist in the current Zone Database, the alias is updated to reflect to members specificed. In other word, new members will be added and removed members will be removed. If no aliases_to_delete are listed, aliases is required. aliases_to_delete and aliases are mutually exclusive.
required: False
type: list
members_add_only: If set to True, new members will be added and old members not specified also remain.
required: False
type: bool
members_remove_only: If set to True, members specified are removed.
required: False
type: bool
aliases_to_delete: List of aliases to be deleted. If no aliases are listed, aliases_to_delete is required. aliases_to_delete and aliases are mutually exclusive.
required: False
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
aliases:
- name: Host1
members:
- 11:22:33:44:55:66:77:88
- name: Target1
members:
- 22:22:33:44:55:66:77:99
- name: Target2
members:
- 22:22:33:44:55:66:77:aa
- name: Target3
members:
- 22:22:33:44:55:66:77:bb
aliases_to_delete:
- name: Target1
- name: Target2
- name: Target3
tasks:
- name: Create aliases
brocade_zoning_alias:
credential: "{{credential}}"
vfid: -1
aliases: "{{aliases}}"
aliases_to_delete: "{{aliases_to_delete}}"
Return Values
msg: Success message
returned: success
type: str
brocade_zoning_alias_facts_by_wwn
Brocade Fibre Channel facts gathering of zoning by WWN
Synopsis
Gather Fibre Channel FOS facts
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
wwn: WWN to search in the aliases within Zone DB.
required: True
type: str
Examples
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
wwn_to_search: "11:22:33:44:55:66:77:88"
tasks:
- name: gather device alias info
brocade_zoning_alias_facts_by_wwn:
credential: "{{credential}}"
vfid: -1
wwn: "{{wwn_to_search}}"
- name: print device alias information matching port_name
debug:
var: ansible_facts['alias']
when: ansible_facts['alias'] is defined
Return Values
msg: Success message
returned: success
type: str
brocade_zoning_cfg
Brocade Fibre Channel zoning cfg configuration
Synopsis
Create, detroy, or update cfgs. The whole of cfgs and cfgs_to_delete are applied to FOS within a single login session to termininate after the completion. If no active cfg is found, cfgsave is executed before the completion of the session. If an active cfg is found, cfgenable of the existing cfg is executed to apply any potential changes before the completion of the session.
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
cfgs: List of cfgs to be created or modified. If an cfg does not exist in the current Zone Database, the cfg will be created with the members specified. If an cfg already exists in the current Zone Database, the cfg is updated to reflect to members specificed. In other word, new members will be added and removed members will be removed. cfgs and cfgs_to_delete are mutually exclusive.
required: False
type: list
members_add_only: If set to True, new members will be added and old members not specified also remain.
required: False
type: bool
members_remove_only: If set to True, members specified are removed.
required: False
type: bool
cfgs_to_delete: List of cfgs to be deleted. cfgs and cfgs_to_delete are mutually exclusive.
required: False
type: list
active_cfg: Cfg to be enabled (cfg_enable) at the end. If no cfg is specified, cfgs are saved (cfg_save).
required: False
type: str
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
cfgs:
- name: newcfg1
members:
- NewZoneName
- NewZoneName2
- name: newcfg2
members:
- NewZoneName
- NewZoneName2
- name: newcfg3
members:
- NewZoneName
- NewZoneName2
cfgs_to_delete:
- name: newcfg2
- name: newcfg3
tasks:
- name: Create cfgs
brocade_zoning_cfg:
credential: "{{credential}}"
vfid: -1
cfgs: "{{cfgs}}"
# cfgs_to_delete: "{{cfgs_to_delete}}"
active_cfg: newcfg2
Return Values
msg: Success message
returned: success
type: str
brocade_zoning_cfg_disable
Brocade Fibre Channel zoning disable configuration
Synopsis
Disable the cfgs that was effective.
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
disable_cfg: Cfg to be disabled.
required: False
type: bool
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
tasks:
- name: Disable cfgs
brocade_zoning_cfg_disable:
credential: "{{credential}}"
vfid: -1
Return Values
msg: Success message
returned: success
type: str
brocade_zoning_copy
Brocade Fibre Channel zoning object copy
Synopsis
Mimics zoneObjectCopy funcionalities. The module is used to confirm that an existing object’s and the new object’s contents match. If they do not, the new object may be created or overwritten to match the contents. If an existing object is Target Driven Zone, the module will error out. If objects do not match in terms of type (Alias, Zone, or Cfg), the module will error out.
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
object_name: Name of the object to copy from.
required: True
type: str
new_name: Name of the object to copy to.
required: True
type: str
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
tasks:
- name: copy alias
brocade_zoning_copy:
credential: "{{credential}}"
vfid: -1
object_name: old_alias
new_name: new_alias
Return Values
msg: Success message
returned: success
type: str
brocade_zoning_default_zone
Brocade Fibre Channel zoning default zone configuration
Synopsis
Update Fibre Channel zoning’s default zone configuration
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
default_zone_access: Default zone access mode. “allaccess” to indicate all access “noaccess” to indicate no access.
required: False
type: str
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
tasks:
- name: Default zoning
brocade_zoning_default_zone:
credential: "{{credential}}"
vfid: -1
default_zone_access: allaccess
Return Values
msg: Success message
returned: success
type: str
brocade_zoning_zone
Brocade Fibre Channel zone configuration
Synopsis
Create, detroy, or update zones. The whole of zones and zones_to_delete are applied to FOS within a single login session to termininate after the completion. If no active cfg is found, cfgsave is executed before the completion of the session. If an active cfg is found, cfgenable of the existing cfg is executed to apply any potential changes before the completion of the session.
Parameters
credential: Login information
required: True
type: dict
fos_ip_addr: IP address of the FOS switch
required: True
type: str
fos_user_name: Login name of FOS switch
required: True
type: str
fos_password: Password of FOS switch
required: True
type: str
https: Encryption to use. True for HTTPS, self for self-signed HTTPS, or False for HTTP
required: True
type: str
choices:
TrueFalseselfvfid: VFID of the switch. Use -1 for FOS without VF enabled or AG.
required: False
type: int
throttle: Throttling delay in seconds. Enables second retry on first failure.
required: optional
type: int
timeout: REST timeout in seconds for operations that take longer than FOS default value.
required: optional
type: int
zones: List of zones to be created or modified. If a zone does not exist in the current Zone Database, the zone will be created with the members specified. If a zone already exist in the current Zone Database, the zone is updated to reflect to members specificed. In other word, new members will be added and removed members will be removed. Peerzones are automatically created only if optional principal members are specified. zones are zones_to_delete are mutually exclusive.
required: True
type: list
members_add_only: If set to True, new members will be added and old members not specified also remain
required: False
type: bool
members_remove_only: If set to True, members specified are removed
required: False
type: bool
zones_to_delete: List of zones to be deleted. zones and zones_to_delete are mutually exclusive.
required: True
type: list
Examples
gather_facts: False
vars:
credential:
fos_ip_addr: "{{fos_ip_addr}}"
fos_user_name: admin
fos_password: password
https: False
zones:
- name: NewZoneName
members:
- Host1
- Target1
- Target2
- name: NewZoneName2
members:
- Host1
- Target2
- name: NewZoneNameP
members:
- 11:22:33:44:55:66:77:88
principal_members:
- 22:22:33:44:55:66:77:88
zones_to_delete:
- name: NewZoneNameP
- name: NewZoneName2
tasks:
- name: Create zones
brocade_zoning_zone:
credential: "{{credential}}"
vfid: -1
zones: "{{zones}}"
# zones_to_delete: "{{zones_to_delete}}"
Return Values
msg: Success message
returned: success
type: str
FOS-ansible Test Version Matrix
The following are the tested ansible releases against the FOS versions. The notes section provide the details on the exceptions and release notes.
FOS-ansible |
FOS |
Notes |
---|---|---|
1.3.0 |
8.2.3a |
The minimum FOS version for module firmwaredownload is v9.0.0. |
1.3.1 |
8.2.3c, 9.0.1d, 9.1.1a |
The minimum FOS version for module firmwaredownload is v9.0.0. |
1.3.2 |
9.0.1e, 9.1.1b |
Documentation
To build documentation
Install dependent packages using
pip install -r docs/requirements.txt
Trigger a build using the Makefile located under the docs directory
cd docs make html
Tip
To fail the documentation on warnings with traceback use
make SPHINXOPTS=-WT html
Access the documentation by opening the _build/index.html in a web-browser
Contribution
Contributors must sign and submit a CAA before a contribution can be accepted. Two CAAs are available, one for individual contributions and one for contributions made on behalf of an entity, e.g., an employer. Select the appropriate link below to electronically execute a CAA.
Contributor Assignment Agreement (“CAA”)
CAA - Individual: https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=7af19c0f-ae97-4b56-b950-fc4796860c79
CAA - Entity: https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=f657df18-ed64-4c51-a8f2-618bbd17d355