diff --git a/ansible/idrac-bootstrap-one.yml b/ansible/idrac-bootstrap-one.yml index 31bfb47cc..c20e9fdf2 100644 --- a/ansible/idrac-bootstrap-one.yml +++ b/ansible/idrac-bootstrap-one.yml @@ -45,12 +45,10 @@ - block: - name: Ensure DellOS6 switch interface is a member of the bootstrap VLAN dellos6_config: - provider: "{{ dell_switch_provider }}" lines: - "switchport access vlan {{ idrac_bootstrap_vlan }}" parents: - "interface {{ switch_interface_name }}" - delegate_to: localhost when: switch_type == 'dellos6' # The tasks in this block are delegated to the controller. @@ -170,12 +168,10 @@ always: - name: Ensure DellOS6 switch iDRAC interface is a member of the management VLAN dellos6_config: - provider: "{{ dell_switch_provider }}" lines: - "switchport access vlan {{ idrac_network_vlan }}" parents: - "interface {{ switch_interface_name }}" - delegate_to: localhost when: switch_type == 'dellos6' when: idrac_bootstrap_required diff --git a/ansible/idrac-bootstrap.yml b/ansible/idrac-bootstrap.yml index dcf4e8b62..7f8627174 100644 --- a/ansible/idrac-bootstrap.yml +++ b/ansible/idrac-bootstrap.yml @@ -116,7 +116,6 @@ # interfaces to it. - role: dell-switch dell_switch_type: "{{ switch_type }}" - dell_switch_provider: "{{ switch_dellos_provider }}" dell_switch_config: - "vlan {{ idrac_bootstrap_vlan }}" dell_switch_interface_config: "{{ switch_interface_config_bootstrap }}" @@ -147,7 +146,6 @@ include_tasks: idrac-bootstrap-one.yml vars: dell_switch_type: "{{ switch_type }}" - dell_switch_provider: "{{ switch_dellos_provider }}" switch_interface_name: "{{ item.key }}" idrac_port_description: "{{ item.value.description }}" idrac_network_ip: "{{ idrac_network_ips[idrac_port_description] }}" @@ -181,7 +179,6 @@ # interfaces from it. - role: dell-switch dell_switch_type: "{{ switch_type }}" - dell_switch_provider: "{{ switch_dellos_provider }}" dell_switch_config: - "no vlan {{ idrac_bootstrap_vlan }}" dell_switch_interface_config: "{{ switch_interface_config_bootstrap }}" diff --git a/ansible/inventory/group_vars/all/switches/dell b/ansible/inventory/group_vars/all/switches/dell deleted file mode 100644 index 4545d75bd..000000000 --- a/ansible/inventory/group_vars/all/switches/dell +++ /dev/null @@ -1,14 +0,0 @@ ---- -# Switch configuration. - -############################################################################### -# Authentication configuration. - -# For DellOS switches, this defines a 'provider' argument to the dellos_* -# modules. -switch_dellos_provider: - host: "{{ ansible_host|default(inventory_hostname) }}" - username: "{{ ansible_user }}" - password: "{{ ansible_ssh_pass }}" - authorize: yes - auth_pass: "{{ switch_auth_pass }}" diff --git a/ansible/overcloud-hardware-register.yml b/ansible/overcloud-hardware-register.yml index 13c9c812d..ac8887f70 100644 --- a/ansible/overcloud-hardware-register.yml +++ b/ansible/overcloud-hardware-register.yml @@ -25,6 +25,7 @@ delegate_to: "{{ seed_host }}" vars: ansible_host: "{{ hostvars[seed_host].ansible_host | default(seed_host) }}" + become: "{{ container_engine == 'podman' }}" - name: Create baremetal nodes command: > @@ -45,6 +46,7 @@ ansible_host: "{{ hostvars[seed_host].ansible_host | default(seed_host) }}" when: - node_show.rc != 0 + become: "{{ container_engine == 'podman' }}" - name: Manage baremetal nodes command: > @@ -59,3 +61,4 @@ ansible_host: "{{ hostvars[seed_host].ansible_host | default(seed_host) }}" when: - node_show.rc != 0 + become: "{{ container_engine == 'podman' }}" diff --git a/ansible/physical-network.yml b/ansible/physical-network.yml index 3361301c4..96d0b232d 100644 --- a/ansible/physical-network.yml +++ b/ansible/physical-network.yml @@ -138,7 +138,6 @@ - role: dell-switch dell_switch_type: "{{ switch_type }}" - dell_switch_provider: "{{ switch_dellos_provider }}" dell_switch_config: "{{ switch_config }}" dell_switch_interface_config: "{{ switch_interface_config }}" dell_switch_save: "{{ switch_config_save }}" diff --git a/ansible/roles/dell-switch/README.md b/ansible/roles/dell-switch/README.md index b98d9d7d2..205a6d3f9 100644 --- a/ansible/roles/dell-switch/README.md +++ b/ansible/roles/dell-switch/README.md @@ -1,9 +1,9 @@ Dell Switch =========== -This role configures Dell switches using the `dellos6`, `dellos9`, or -`dellos10` Ansible modules. It provides a fairly minimal abstraction of the -configuration interface provided by the `dellos` modules, allowing for +This role configures Dell switches using the `dellemc.os6`, `dellemc.os9`, or +`dellemc.os10` Ansible collections. It provides a fairly minimal abstraction of +the configuration interface provided by the collections, allowing for application of arbitrary switch configuration options. Requirements @@ -17,9 +17,6 @@ Role Variables `dell_switch_type` is the type of Dell switch. One of `dellos6`, `dellos9`, or `dellos10`. -`dell_switch_provider` is authentication provider information passed as the -`provider` argument to the `dellos` modules. - `dell_switch_config` is a list of configuration lines to apply to the switch, and defaults to an empty list. @@ -50,12 +47,6 @@ passwords. It applies global configuration for LLDP, and enables two roles: - role: dell-switch dell_switch_type: "dellos9" - dell_switch_provider: - host: "{{ switch_host }}" - username: "{{ switch_user }}" - password: "{{ switch_password }}" - authorize: yes - auth_pass: "{{ switch_auth_pass }}" dell_switch_config: - "protocol lldp" - " advertise dot3-tlv max-frame-size" diff --git a/ansible/roles/dell-switch/defaults/main.yml b/ansible/roles/dell-switch/defaults/main.yml index 36118c251..527427897 100644 --- a/ansible/roles/dell-switch/defaults/main.yml +++ b/ansible/roles/dell-switch/defaults/main.yml @@ -2,9 +2,6 @@ # Type of Dell switch. One of dellos6, dellos9, or dellos10. dell_switch_type: -# Authentication provider information. -dell_switch_provider: - # List of configuration lines to apply to the switch. dell_switch_config: [] diff --git a/ansible/roles/dell-switch/tasks/main.yml b/ansible/roles/dell-switch/tasks/main.yml index 958b04b71..2f7620ee8 100644 --- a/ansible/roles/dell-switch/tasks/main.yml +++ b/ansible/roles/dell-switch/tasks/main.yml @@ -1,24 +1,18 @@ --- - name: Ensure DellOS6 switches are configured - delegate_to: localhost - dellemc.os6.os6: - provider: "{{ dell_switch_provider }}" - src: "{{ lookup('template', 'dellos6-config.j2') }}" + dellemc.os6.os6_config: # noqa fqcn[canonical] + src: "../templates/dellos6-config.j2" save: "{{ dell_switch_save | bool }}" when: dell_switch_type == 'dellos6' - name: Ensure DellOS9 switches are configured - delegate_to: localhost - dellemc.os9.os9: - provider: "{{ dell_switch_provider }}" - src: "{{ lookup('template', 'dellos9-config.j2') }}" + dellemc.os9.os9_config: # noqa fqcn[canonical] + src: "../templates/dellos9-config.j2" save: "{{ dell_switch_save | bool }}" when: dell_switch_type == 'dellos9' - name: Ensure DellOS10 switches are configured - delegate_to: localhost - dellemc.os10.os10: - provider: "{{ dell_switch_provider }}" - src: "{{ lookup('template', 'dellos10-config.j2') }}" + dellemc.os10.os10_config: # noqa fqcn[canonical] + src: "../templates/dellos10-config.j2" save: "{{ dell_switch_save | bool }}" when: dell_switch_type == 'dellos10' diff --git a/doc/source/configuration/reference/physical-network.rst b/doc/source/configuration/reference/physical-network.rst index d1bbf8999..869df5179 100644 --- a/doc/source/configuration/reference/physical-network.rst +++ b/doc/source/configuration/reference/physical-network.rst @@ -241,27 +241,22 @@ by Ansible: Dell OS6, OS9, and OS10 ----------------------- -Configuration for these devices is applied using the ``dellos6_config``, -``dellos9_config``, and ``dellos10_config`` Ansible modules. +Configuration for these devices is applied using the +``dellemc.os6.os6_config``, ``dellemc.os9.os9_config``, and +``dellemc.os10.os10_config`` Ansible modules. ``switch_type`` should be set to ``dellos6``, ``dellos9``, or ``dellos10``. ``switch_config_save`` may be set to ``true`` to enable saving configuration after it has been applied. -Provider -^^^^^^^^ - * ``ansible_host`` is the hostname or IP address. Optional. - * ``ansible_user`` is the SSH username. - * ``ansible_ssh_pass`` is the SSH password. - * ``switch_auth_pass`` is the 'enable' password. - -Alternatively, set ``switch_dellos_provider`` to the value to be passed as the -``provider`` argument to the ``dellos*_config`` module. +* ``ansible_connection`` should be ``ansible.netcommon.network_cli``. +* ``ansible_network_os`` should be ``dellemc.os6.os6``, ``dellemc.os9.os9`` or + ``dellemc.os10.os10`` depending on the switch type. Dell PowerConnect ----------------- diff --git a/releasenotes/notes/bug-2137705-e156ef02a2fc4514.yaml b/releasenotes/notes/bug-2137705-e156ef02a2fc4514.yaml new file mode 100644 index 000000000..900ea76cf --- /dev/null +++ b/releasenotes/notes/bug-2137705-e156ef02a2fc4514.yaml @@ -0,0 +1,13 @@ +--- +upgrade: + - | + Deployments using Dell OS6, OS9 and OS10 switches are required to update + their configuration according to `Dell OS6, OS9, and OS10 documentation + `_. +fixes: + - | + Fixes physical network configuration for Dell OS6, OS9 and OS10 switches. + Note that users are required to update their configuration according to + `Dell OS6, OS9, and OS10 documentation + `_. + `LP#2137705 `__