12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- # Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- ---
- - name: Setting metric
- command: nmcli connection modify {{ item.name }} ipv4.route-metric {{ item.value }}
- with_items:
- - { name: "{{ public_nic }}", value: "{{ public_metric }}" }
- - { name: "{{ host_network_nic }}", value: "{{ host_metric }}" }
- changed_when: false
- - name: Reactivate the nics
- command: nmcli connection up {{ item.name }}
- with_items:
- - { name: "{{ public_nic }}" }
- - { name: "{{ host_network_nic }}" }
- changed_when: false
- - name: Set metric for device container
- command: nmcli connection modify {{ mngmnt_network_nic }} ipv4.route-metric {{ mngmnt_metric }}
- changed_when: false
- when: device_config_support
- - name: Reactivate the device nic
- command: nmcli connection up {{ mngmnt_network_nic }}
- changed_when: false
- when: device_config_support
- - name: Set metric for ib nic
- command: nmcli connection modify {{ ib_network_nic }} ipv4.route-metric {{ ib_metric }}
- changed_when: false
- when: ib_switch_support
- - name: Reactivate the ib nic
- command: nmcli connection up {{ ib_network_nic }}
- changed_when: false
- when: ib_switch_support
|