networking - Creating new network interfaces from a list in ansible task -


i looked on this list , didn't find answer on how create new network interface `ifconfig'. want achieve create interface every string item in variable list, before want delete interfaces excluding 1 ansible-playbook using deploying play. of have idea how approach such task ?

the nmcli module best bet among official modules.

http://docs.ansible.com/ansible/nmcli_module.html

you're going want like:

  • enumerate interfaces list (using either ansible variables or parsing ifconfig output)
  • identify 1 ansible connected over
  • exclude ansible interface list (using jinja2 filters probably)
  • use nmcli remove interfaces in filtered list.
  • use nmcli add interfaces in separate list.

Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -