From 320912dffcb7d1bcbbfdb457f340f8db1ac0df71 Mon Sep 17 00:00:00 2001 From: Wen Liang Date: Mon, 26 Oct 2020 10:29:22 -0400 Subject: [PATCH] Use port to replace slaves in bond interface Signed-off-by: Wen Liang --- README.md | 2 ++ playbooks/bond.yml | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b07c296..d6638bd 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/playbooks/bond.yml b/playbooks/bond.yml index 4985ec9..9c4d8a2 100644 --- a/playbooks/bond.yml +++ b/playbooks/bond.yml @@ -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: @@ -17,7 +23,7 @@ mode: balance-rr options: miimon: '140' - slaves: + port: - eth1 - eth2 roles: