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

How can I apply the most recently generated catalog? ie, agent with "cahceonly" mode?

$
0
0
Our setup is a puppet-master with foreman and running puppet agent in cron. The agent compiles the catalog and applies it. Is it possible to re-apply the most recently generated catalog? An obvious use case is to generate the catalog daily, and reapply it more periodically; another use-case is for testing purposes to modify the json-catalog file and re-apply it. Another use-case is to use `puppet apply` with parameters. The following solution does not work: `puppet apply --verbose --catalog /var/lib/puppet/client_data/catalog/$HOSTNAME.json`. Well, it runs, but it actually seems to apply nothing. ```Info: Loading facts Notice: Compiled catalog for db04-a.intra.uibk.ac.at in environment development_c10267 in 0.01 seconds Info: Applying configuration version '1488186342' Notice: Finished catalog run in 0.39 seconds ``` Another problematic solution is: `puppet catalog apply --terminus json`. It is problematic because there is no control for command-line parameters as there is with agent and apply, ie, `--tags` , `--noop`, etc. It is also problematic because after the run, it spits out to stdout the entire json catalog, making it very difficult to see what failed. FYI: ``` # puppet --version 3.8.7 ```

Viewing all articles
Browse latest Browse all 6104

Trending Articles



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