Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7542169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:05:40+00:00 2026-05-30T08:05:40+00:00

I am currently working on implementing puppet in our environment, however, I have a

  • 0

I am currently working on implementing puppet in our environment, however, I have a request I dont know if puppet itself can fill.

If I have a configuration under /etc/myconfig.conf. And I want it to be written only if it doesnt already exist; I can use the onlyif function. But is there any way that I can get puppet to do something, a notify() or something if it detect a change in a file..?

I dont want it to actually change the file, only notify me that the file is not the way it want it to be..

There is really no examples or anything in this question, but I hope someone is able to push me in the right direction here. If I create a solution for this based on tips, I will post the answer myself for others to learn from.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T08:05:42+00:00Added an answer on May 30, 2026 at 8:05 am

    For only creating a file if it doesn’t exist, try setting replace to false, like so:

    file { "/etc/myconfig.conf":
      ensure => present,
      source => "puppet:///modules/${module_name}/myconfig.conf",
      replace => false,
    }
    

    Docs for that are here: http://docs.puppetlabs.com/references/2.7.0/type.html#file

    For the notification, puppet auditing will do what you need:
    http://puppetlabs.com/blog/all-about-auditing-with-puppet/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on implementing the Distributed Annotation System-standard for our project openSNP.org, however,
I'm currently working on implementing a fulltext search engine for one of our sites,
I am currently working on implementing a CMS for a website. I have very
I'm currently working on implementing the public API of our web application. The application
I'm currently working on a Google Maps project and am implementing a search function.
A little backstory, currently I'm working on implementing a triangle rendering system in Expression2
Im currently working with an API which requires we send our collection details in
I`m currently working on a script, and I have the following situation. function somnicefunction()
I'm currently working on implementing a logging system for a new Hadoop cluster I've
I am currently working on implementing an admob adview in my app. I did

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.