diff --git a/ansible/group_vars/switches/mellanox b/ansible/group_vars/switches/mellanox new file mode 100644 index 0000000000000000000000000000000000000000..7cb69791651add876bd50ef8cd069db532db52d4 --- /dev/null +++ b/ansible/group_vars/switches/mellanox @@ -0,0 +1,12 @@ +--- +# Switch configuration. + +############################################################################### +# Authentication configuration. + +# For Mellanox switches, this defines a 'provider' argument to the +# mellanox-switch role. +switch_mellanox_provider: + host: "{{ ansible_host }}" + username: "{{ ansible_user }}" + auth_pass: "{{ switch_auth_pass }}" diff --git a/ansible/physical-network.yml b/ansible/physical-network.yml index f87ee3b6e926eb9b293387c087b1d8910a962615..eaa4c9016ef705408927b6a0fcea26ab387d996d 100644 --- a/ansible/physical-network.yml +++ b/ansible/physical-network.yml @@ -93,3 +93,15 @@ junos_switch_config_format: "{{ switch_junos_config_format }}" junos_switch_config: "{{ switch_config }}" junos_switch_interface_config: "{{ switch_interface_config }}" + +- name: Ensure Mellanox physical switches are configured + hosts: switches_of_type_mellanox:&switches_in_display_mode_False + gather_facts: no + roles: + - role: ssh-known-host + + - role: stackhpc.mellanox-switch + mellanox_switch_type: "{{ switch_type }}" + mellanox_switch_provider: "{{ switch_mellanox_provider }}" + mellanox_switch_config: "{{ switch_config }}" + mellanox_switch_interface_config: "{{ switch_interface_config }}" diff --git a/releasenotes/notes/mellanox-switch-cb82a8c278f5e652.yaml b/releasenotes/notes/mellanox-switch-cb82a8c278f5e652.yaml new file mode 100644 index 0000000000000000000000000000000000000000..10745ed4ab81c5eb4b3738d6c3a7404ffef13f1f --- /dev/null +++ b/releasenotes/notes/mellanox-switch-cb82a8c278f5e652.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds support for configuration of Mellanox switches running MLNX-OS. This + is integrated with the `kayobe physical network configure` command. diff --git a/requirements.yml b/requirements.yml index c0ae60f73d6dffe31f46d8b5f8cfbcd5bff7ea72..34082bd6c5613a9fc1cc4b7c623a27fbb86d75c0 100644 --- a/requirements.yml +++ b/requirements.yml @@ -14,6 +14,7 @@ - src: stackhpc.grafana-conf - src: stackhpc.libvirt-host - src: stackhpc.libvirt-vm +- src: stackhpc.mellanox-switch - src: stackhpc.os-flavors - src: stackhpc.os-images - src: stackhpc.os-ironic-state