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

augeas does not see a directory

$
0
0
Hi there! I have installed [nut](http://www.networkupstools.org/download.html) on my servers and i want change configs for all servers. So i tell to my puppet - do it! case $fqdn { /my-serv1/: { case $operatingsystem { centos: { $nut_path = '/files/etc/ups/upsmon.conf' } default: { $nut_path = '/files/etc/nut/upsmon.conf' } } augeas { "upsmon": context => "$nut_path", onlyif => "match upsmon.conf/*[.=~regexp('MY_UPS_DNS_NAME')] size == 0", changes => [ "rm MONITOR[.]", "set MONITOR[1]/system/upsname MY_UPS_NAME", "set MONITOR[1]/system/hostname MY_UPS_DNS_NAME", "set MONITOR[1]/powervalue 1", "set MONITOR[1]/username MY_UPS_USER", "set MONITOR[1]/password MY_UPS_PASS", "set MONITOR[1]/type slave", "set MONITOR[2]/system/upsname MY_UPS_NAME2", "set MONITOR[2]/system/hostname MY_UPS_DNS_NAME2", "set MONITOR[2]/powervalue 1", "set MONITOR[2]/username MY_UPS_USER", "set MONITOR[2]/password MY_UPS_PASS", "set MONITOR[2]/type slave", ], notify => Service["nut-service"] } service { "nut-service": name => $operatingsystem ? { Centos => "ups", Gentoo => "upsmon", default => "nut-client", }, require => Augeas["upsmon"], enable => true, ensure => running, } } And this work just for Debian, but for Centos & Gentoo - this does not work. I run "puppet agent --debug --no-daemonize --onetime" and did not see any errors. But i think this is all because augeas does not see a directory /etc/nut in centos & gentoo augtool> ls /files/etc/n networks/ nsswitch.conf/ ntp.conf/ Why? And how i can fix it?

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>