Ask Your Question
1

puppet config set needs unset

asked 2016-01-13 14:34:35 -0600

hesco gravatar image

updated 2016-01-13 17:18:06 -0600

puppet config supports a set key '' but seems to offer no way to unset a key once it exists in puppet.conf

puppet config set --section main server pm_upgraded.example.com
puppet config print server 
pm_upgraded.example.com

leaving the question: what is the best way to purge the agent.server key which is set by the pe-agent installation?

Failure to purge that setting returns two entries with puppet config print server and the agent entry defaults to 'puppet' if the key is assigned a null value.
With no /etc/hosts entry to back that up.

If we set the new server address in both the main and the agent sections, will the duplicate create issues for us?

We are building an upgraded 3.8.3 pe-master to which we wish to migrate our existing environments from a 3.2.3 pe-master. I will need to redirect the existing nodes to the new server once that process is complete. I am trying to sort out the best way to do this.

Any guidance would be appreciated.

-- Hugh

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-14 11:23:51 -0600

hesco gravatar image

I also posted this same question to support.puppetlabs.com (issue arose while working for an employers with a PE support contract). The response I got back through that channel informs me that a feature request for an 'unset' target to the puppet config command has been created; and that in the mean time:

However to answer the question "If we set the new server address in both the main and the agent sections, will the duplicate create issues for us?" it depends. If they are not the same certname than yes agent runs will fail. If the server setting is just a duplicate and has the same certname than it will not be an issue.

So that is my work-around, to set the same value for that key in both the main and the agent sections. Saves me from a rather inelegant perl or sed or awk solution.

-- Hugh

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-01-13 14:34:35 -0600

Seen: 71 times

Last updated: Jan 14 '16