Created
June 10, 2023 04:09
-
-
Save h0tw1r3/b04c8d6432fd6da581e79030627a3f51 to your computer and use it in GitHub Desktop.
Test single exec to manage systemd unit override with Puppet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec { 'override-service-unit': | |
provider => 'shell', | |
environment => ['SYSTEMD_EDITOR=tee'], | |
command => 'echo "[Service]\nPrivateTmp=no\n" | script -qefc "systemctl edit nutcracker.service" /dev/null', | |
unless => '/usr/bin/env systemctl show nutcracker.service --property=PrivateTmp | grep "=no"', | |
notify => Service['nutcracker'], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment