Skip to content

nmcli integration #3

@smcgrat

Description

@smcgrat

Thanks for this project guy's, looks very interesting, keep up the good work.

Suggestion for enhancement.

Feel free to ignore this if it is a result of my own environment.

The image I was testing with did not have Network Manager installed. Here's the patch roles/pre_ohpc/tasks/main.yml I generated to integrate it.

diff --git a/roles/pre_ohpc/tasks/main.yml b/roles/pre_ohpc/tasks/main.yml
index 49aeffe..3da20fe 100644
--- a/roles/pre_ohpc/tasks/main.yml
+++ b/roles/pre_ohpc/tasks/main.yml
@@ -30,6 +30,8 @@
        - "libselinux-python"
        - "libsemanage-python"
        - "policycoreutils"
+       - "NetworkManager"
+       - "NetworkManager-glib"
 #       - "lua"  # testing; this could fix the lmod-ohpc issue?
  #otherwise, do a yum update --skip-broken, yum update...
 
@@ -55,6 +57,22 @@
 
    - template: src=firewall_conf/zones/public.xml dest=/etc/firewalld/zones/public.xml
 
+   - name: start Network Manager
+     service: 
+       name: NetworkManager
+       state: started
+       enabled: yes
+
+   - name: manage interface with nmcli
+     nmcli: 
+       conn_name: "{{ private_interface }}"
+       ifname: "{{ private_interface }}"
+       type: ethernet
+       state: present
  
    - name: add private interface to internal zone via nmcli
      command: nmcli connection modify {{ private_interface }} connection.zone internal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions