Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare cli.toml files as managed via Puppet #323

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

quba42
Copy link
Contributor

@quba42 quba42 commented Nov 22, 2023

This would have saved us some confusion (though we did suspect foreman-installer had started overwriting our config pretty quickly).

I am not attached to the precise wording or formatting.

The idea is similar to #210 but for the cli.toml files written by this module.

Not a Puppet expert so please do tell me what else I need to add for this to become mergable.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it help if we exposed the manage_root_config parameter as an installer parameter?

@@ -8,6 +8,7 @@
Optional[Boolean] $verify_ssl = undef,
Optional[Boolean] $dry_run = undef,
| -%>
# This file is managed by puppet-pulpcore. Manual edits will be overwritten with the next run.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may not be true. There's a condition on it being managed:

if $manage_root_config and (($username and $password) or ($cert and $key)) {

So what users can do is:

  • Run foreman-installer
  • Set pulpcore::manage_root_config: false in /etc/foreman-installer/custom-hiera.yaml
  • Run foreman-installer

Now you have the file /root/.config/pulp on disk with this warning, but it's no longer managed.

I don't see a good way around this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, is it possible to have Puppet check for just the one line and remove it if pulpcore::manage_root_config: false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have amended the wording.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants