Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

convert netmask to cidr

$
0
0
HI - I'm trying to configure puppet to setup keepalived. As part of this I need to get the netmask of an ip in CIDR notation. I can use the fact $::netmask_eth0 to get a netmask like 255.255.255, but the keepalived configuration file requires /24 notation. I found the ruby gen NetAddr::CIDR looks like it could do the job, but I don't appear to be able to invoke that from inside a puppet inline_template even though "gem list netaddr" shows it installed. Any guidance or ideas? Thanks

Viewing all articles
Browse latest Browse all 6104

Trending Articles