Hello Luke

based on output you sent you can tell which one is primary. I think you'd have 
to write some puppet function for finding it in that array. Also this [1] 
puppet module could be used for inspiration for how to parse ENC data.

[1] https://github.com/treydock/puppet-foreman_networking

Hope this helps

--
Marek

On Sunday 11 of September 2016 22:21:55 Luke Tinker wrote:
>  foreman_interfaces:
>   - mac: 6a:ab:a5:a4:1a:99
>     ip: 10.1.1.1
>     type: Interface
>     name: myhost.mydomain.tld
>     attrs:
>       netmask: 255.255.255.0
>       mtu: '1500'
>       network: 10.1.1.0
>     virtual: false
>     link: true
>     identifier: en0
>     managed: true
>     primary: true

this is primary interface

>     provision: true
>     subnet: 
>   - mac: a8:a0:ab:5a:ea:1f
>     ip: 
>     type: Interface
>     name: ''
>     attrs:
>       mtu: '1500'
>     virtual: false
>     link: true
>     identifier: en1
>     managed: false
>     primary: false

this is not :-)

>     provision: false
>     subnet: 

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to