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

nmcli integration #3

Open
smcgrat opened this issue Sep 3, 2018 · 0 comments
Open

nmcli integration #3

smcgrat opened this issue Sep 3, 2018 · 0 comments

Comments

@smcgrat
Copy link

smcgrat commented Sep 3, 2018

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant