-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
6.15.z
Description of problem:
context:
- provision a system that contains multiple nics
- use a single physical interface as primary/provision
- after provisioning, modify the network configuration and create a bond (primary interface becomes a member of the bond)
- when facts are updated, the physical interface (the one used to provision) gets its type changed to Bond
- bond interface is created, but not with correct details from the host (like bond mode)
How reproducible:
Always, see steps to reproduce
Is this issue a regression from an earlier version:
Unsure
Steps to Reproduce:
- build a system with at least 2 nics on same subnet
- use one of those nics as primary/provisioning when configuring the host on Satellite
- let it provision
- install ansible-core and rhel-system-roles on the new provisioned system
- modify the variable NICs on the playbook below to match the interface names of your system
- name: an example playbook
hosts: localhost
tasks:
- name: Create a List variable
set_fact:
NICs : [enp11s0,enp12s0]
- name: add header to file
blockinfile:
path: /tmp/bond.vars.{{ ansible_fqdn }}
create: yes
block: |
network_provider: nm
network_connections: - name: bond0
type: bond
autoconnect: yes
interface_name: bond0
ip:
dhcp4: yes
auto6: no
bond:
mode: active-backup
state: up
delegate_to: localhost
- name: add bond members
blockinfile:
path: /tmp/bond.vars.{{ ansible_fqdn }}
block: |
- Add network member
- name: "{{ item }}"
interface_name: "{{ item }}"
type: ethernet
controller: bond0
state: up
marker: "# {mark} ANSIBLE MANAGED BLOCK {{ item }}"
loop: "{{ NICs }}"
delegate_to: localhost
- name: Include vars
include_vars:
file: /tmp/bond.vars.{Unknown macro: { ansible_fqdn }}
- name: Check variables before run
debug:
msg: "{{ network_connections }}"
- name: Configure bond and add slaves
include_role:
name: rhel-system-roles.network * run the playbook the provisioned host (run it locally)
- upload new facts after the playbook is done
subscription-manager facts --update
Actual behavior:
Facts are uploaded and interfaces are changed, including the type of the physical interface (which becomes of type bond)
Expected behavior:
Existing interface types should not be updated.
Business Impact / Additional info: