Skip to content

Commit

Permalink
Use port to replace slaves in bond interface
Browse files Browse the repository at this point in the history
Signed-off-by: Wen Liang <[email protected]>
  • Loading branch information
liangwen12year authored and tyll committed Dec 15, 2021
1 parent 296dfa4 commit 320912d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ For example playbooks, see the `playbooks/` directory. Run a playbook:
```shell
ansible-playbook playbooks/bond.yml -i rhel8-cloud,
```
Note, in order to run the above playbook, nmstate 0.4 or later version must be
already installed on target machine.
8 changes: 7 additions & 1 deletion playbooks/bond.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
- hosts: all
become: True
tasks:
# 'port' is only supported by nmstate 0.4 or later version
- name: Install nmstate package
package:
name: nmstate
state: present

- nmstate_apply:
state:
interfaces:
Expand All @@ -17,7 +23,7 @@
mode: balance-rr
options:
miimon: '140'
slaves:
port:
- eth1
- eth2
roles:
Expand Down

0 comments on commit 320912d

Please sign in to comment.