How to enable systemd instantiated service with puppet?
- by Richard Pena
I've got the following puppet service:
service { "getty@ttyUSB0.service":
provider => systemd,
ensure => running,
enable => true,
}
When I try to apply this configuration on my client, it throws the following error:
err: /Stage[main]//Node[puppetclient]/Service[[email protected]]/enable: change from false to true failed: Could not enable [email protected]:
The service is running fine and I can make sure it's started on system boot by adding a symlink to getty.target.wants:
ln -s /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@ttyUSB0.service
Of source, I could go ahead and remove "enable = true" from the service definition and include a the symlink manually in the puppet configuration, but shouldn't puppet take care of this? Am I doing something terribly wrong?