puppet
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| puppet [2017/03/28 14:48] – [Value in manifests] k2patel | puppet [2020/08/10 02:35] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Puppet (data center automation and configuration management framework) ====== | ====== Puppet (data center automation and configuration management framework) ====== | ||
| + | |||
| + | [[Puppet Upgrade 4.x to 5.x]] | ||
| ==== Puppet YUM Repository ==== | ==== Puppet YUM Repository ==== | ||
| Line 39: | Line 41: | ||
| </ | </ | ||
| + | ==== Puppet Dynamic values playground ==== | ||
| + | === EPP and passing values === | ||
| + | <code ruby> | ||
| + | $template_parameters = { | ||
| + | | ||
| + | test2 => $test:: | ||
| + | | ||
| + | } | ||
| + | |||
| + | content => epp(' | ||
| + | </ | ||
| + | ==== trimming values ==== | ||
| + | Following can grab the last character from the hostname and convert to integer to avoid warning. | ||
| + | <code ruby> | ||
| + | $esnumber = inline_epp('< | ||
| + | </ | ||
| ==== Checking Hiera Value ==== | ==== Checking Hiera Value ==== | ||
| **Trying to lookup vhostip value** | **Trying to lookup vhostip value** | ||
| Line 279: | Line 297: | ||
| create_resources(' | create_resources(' | ||
| </ | </ | ||
| + | |||
| + | ==== Troubleshooting ==== | ||
| + | === duplicate resource was found while collecting exported resources === | ||
| + | 8-O | ||
| + | <code bash | error > | ||
| + | Info: Loading facts | ||
| + | Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: A duplicate resource was found while collecting exported resources, with the type and title Apache:: | ||
| + | Warning: Not using cache on failed catalog | ||
| + | Error: Could not retrieve catalog; skipping run | ||
| + | </ | ||
| + | |||
| + | |||
| + | Many suggestions from the puppet forums to run query shown below, didn't helped. | ||
| + | |||
| + | <code bash | depend on your puppet version select one which works> | ||
| + | sudo -u postgres psql puppetdb -c ' | ||
| + | |||
| + | sudo -u postgres psql puppetdb -c ' | ||
| + | </ | ||
| + | |||
| + | Only thing worked for me to drop database and recreate. | ||
| + | |||
| + | <code bash> | ||
| + | systemctl stop puppetdb | ||
| + | su - postgres | ||
| + | dropdb puppetdb | ||
| + | createdb -E UTF8 -O puppetdb puppetdb | ||
| + | psql puppetdb -c ' | ||
| + | </ | ||
| + | |||
| + | === Mapping values === | ||
| + | <code ruby> | ||
| + | <%- $ips = $vs_map[$name].map |$val| { $val[' | ||
| + | </ | ||
| + | |||
| ==== External Links ==== | ==== External Links ==== | ||
| Line 287: | Line 340: | ||
| [[ https:// | [[ https:// | ||
| + | |||
| + | [[ https:// | ||
puppet.1490712509.txt.gz · Last modified: 2020/08/10 02:30 (external edit)
