I have configured puppet master and agent for a small cluster. I know that for file transfer, I have to user file resource of puppet and it will overwrite existing file and if given it will also restart the service. Is there a way to update file on agent only if it is update ? I have found an option "replace" that do not write updated file to the given location if that file already exist. But what happen if the old file have old content ? How to do this
puppet update a configuration file only if it is updated
776 views Asked by Hafiz Muhammad Shafiq At
1
There are 1 answers
Related Questions in PUPPET
- Way to capture the exec command result which can be used later in puppet
- Puppet lookup for server facts
- Outsystem tool Unattended Installation - Config Tool via Puppet
- How to check in puppet if one of the array items is a sub-string of a given string?
- SSL Error when attempting to configure Puppet Server certificate requests
- Unknown resource type: 'auth::file_array' trying to use Puppet's Defined Resource Type
- How to create rakefile for ra10ke
- Onboard new infra under Puppet
- How to run a nested puppet module?
- Cannot create simple file with puppet locally or at client node
- Puppet Unknown variable: 'osfamily' on Rocky 9
- R10K module get wrong ruby version when tries to install gem r10k
- Changing Array[String] in Puppet
- Puppet CSR Issue using external certificates
- Specific puppet agent has different group resource to puppet server (and other agents)
Related Questions in PUPPET-ENTERPRISE
- Outsystem tool Unattended Installation - Config Tool via Puppet
- Onboard new infra under Puppet
- How to generate SSH key for use with Puppet and Azure DevOps?
- How to handle Ruby find command return undefined method `[]' for nil:nilclass (nomethoderror)
- puppet attribute valdiate_cmd in concat fragment
- puppet-agent install not available from repo's on Debian Bullseye
- Puppet module generate - the action of generate does not exist in puppet module command
- why can't I see my code environment in puppet enterprise
- Can't set a bash variable using exec command in Puppet
- Puppet Enterprise 2023.0.0 Local environment doesn't match server specified environment
- Error: Could not retrieve catalog from remote server: Error 400 on SERVER
- Get instance memory (in GB) in puppet
- Puppet epp conditionals is there elsif?
- Puppet agent disabled in Puppet master
- Unable to get correct key/value pair from a Map Function - Puppet
Related Questions in PUPPETLABS-APACHE
- Puppet set Apache Header X-Frame-Options
- Puppet tomcat install doesn't run chained instance resource
- How to copy files from master to agent nodes using tasks
- How to run puppet forge modules in linux ubuntu machine
- Why would a Puppet module's main class be included by a sub-class?
- Using Puppet to install Azure client to all nodes
- Pupperserver with Adopt-OpenJDK
- Open Source Puppet Upgrade from 3.8.7 on Ubuntu OS
- Platform Independent Manifest to install and run apache2 or httpd
- Copy log file from Agent to Master Puppet
- Maintain sub-folder and files permission as in source: puppet
- puppet update a configuration file only if it is updated
- Puppet install apache ubuntu
- Unable to restart puppetserver service
- Puppet Apache mod_alias config
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
From the comments, I understand that you want to allow the agent's copy of the file to drift and be updated only if it changes again on the master.
This is not possible. And if you think about how Puppet works, you might realise it would be difficult to add a feature like this into the Puppet File type. While figuring out whether the desired state is different from the actual state is easy enough, how could Puppet distinguish between "drift" caused by local changes made outside of Puppet, and "drift" caused by a new version of the file being published in the manifests - or both?