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

No option to turn off overwriting of the file if it is later changed #30

Open
threepistons opened this issue Jan 31, 2019 · 1 comment

Comments

@threepistons
Copy link

Given

  • Ubuntu 18.04
  • Puppet agent 6.0.2
  • Puppet server 5.5.3
  • nsswitch module 2.1.0
  • Hiera as follows:
nsswitch::passwd:
  - sss
  - files
nsswitch::group:
  - sss
  - files
nsswitch::shadow:
  - sss
  - files
nsswitch::sudoers: files
nsswitch::gshadow: files
nsswitch::networks: files
nsswitch::netgroup: sss
nsswitch::protocols:
  - db
  - files
nsswitch::services:
  - db
  - files
nsswitch::ethers:
  - db
  - files
nsswitch::rpc:
  - db
  - files
nsswitch::hosts:
  - files
  - 'mdns4_minimal [NOTFOUND=return]'
  - dns
  • A Puppet-managed workstation where the nsswitch.conf file has been modified after deployment.

When I

Run puppet agent -t as root on the workstation.

In order to

Restore the nsswitch.conf file to how I defined it in Hiera.

I get

The file does not change.

I expected

The file to be overwritten with the content specified in Hiera.

I suspect this is because

The file resource in init.pp doesn't specify "replace => yes".

@threepistons threepistons changed the title No option to force overwriting of the file if it is later changed No option to turn off overwriting of the file if it is later changed Feb 1, 2019
@threepistons
Copy link
Author

threepistons commented Feb 1, 2019

This is actually because of an error in my manifest: the module is configured but never actually called. I offer my apologies.

Whilst trying to figure out what was going on, I've written in the ability to turn off overwriting. It's in my fork if you think it might be useful. I've edited the issue title to reflect the new feature.

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

No branches or pull requests

1 participant