Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document nmstate as experimental and require an override to use it #843

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion roles/edpm_network_config/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
# This variable let the use choose which tool will be used to configure networking on hosts
# Accepted values are:
# * os-net-config (default) -> the os-net-config will be used
# * nmstate -> the network role from linux-system-roles/rhel-system-roles will be used to
# * nmstate (experimental, unsupported) -> the network role from linux-system-roles/rhel-system-roles will be used to
# configure networking on hosts. In particular, the nmstate tool should cover all the
# supported scenario. Refer to nmstate.io for configuration snippets.
edpm_network_config_tool: os-net-config

# Must be set to true to allow usage of nmstate as edpm_network_config_tool
edpm_network_config_tool_nmstate_override: false

# Packages needed by nmstate (via system-role)
edpm_network_config_systemrole_nmstate_dependencies:
- NetworkManager-ovs
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_network_config/molecule/nmstate/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
vars:
# edpm_network_config - nmstate
edpm_network_config_tool: 'nmstate'
edpm_network_config_tool_nmstate_override: true
edpm_network_config_template: |
---
interfaces:
Expand Down
9 changes: 9 additions & 0 deletions roles/edpm_network_config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
# License for the specific language governing permissions and limitations
# under the License.

- name: Fail when edpm_network_config_tool=nmstate unless edpm_network_config_tool_nmstate_override=true
ansible.builtin.fail:
msg: |
edpm_network_config_tool=nmstate is experimental and not supported.
Set edpm_network_config_tool_nmstate_override=true to continue anyway.
when:
- edpm_network_config_tool == 'nmstate'
- not edpm_network_config_tool_nmstate_override|bool

- name: Configure network with network role from system roles [nmstate]
when: edpm_network_config_tool == 'nmstate'
become: true
Expand Down
Loading