Re: [Puppet Users] Creation of modifiable files via puppet

2012-10-09 Thread Mason Turner
That is the intent of "ensure => present". If the file isn't there, puppet will create it with the source/content parameter. If it is there (exists), puppet will leave it alone. http://docs.puppetlabs.com/references/latest/type.html#file — Mason Turner On Oct 9, 2012, at 1:19 AM, pdurkin wrot

Re: [Puppet Users] Creation of modifiable files via puppet

2012-10-09 Thread David Schmitt
Use file's replace => false parameter. See http://docs.puppetlabs.com/references/latest/type.html#file Fun, D. On 09.10.2012 07:19, pdurkin wrote: I've been looking around but can't seem to find an answer to this. I would like to create a file whose initial contents come from the default in

Re: [Puppet Users] Creation of modifiable files via puppet

2012-10-08 Thread Peter Brown
On 9 October 2012 16:26, Paul Tötterman wrote: >> Is it possible then I should be running an exec to copy the file from the >> server and use the unless (file exists already)? > > exec { 'foobar': > command => '/usr/bin/wget https://... -O /file/location', > creates => '/file/location', > } T

Re: [Puppet Users] Creation of modifiable files via puppet

2012-10-08 Thread Paul Tötterman
> Is it possible then I should be running an exec to copy the file from the server and use the unless (file exists already)? exec { 'foobar': command => '/usr/bin/wget https://... -O /file/location', creates => '/file/location', } Cheers, Paul -- You received this message because you are s

Re: [Puppet Users] Creation of modifiable files via puppet

2012-10-08 Thread Peter Brown
On 9 October 2012 15:54, pdurkin wrote: > Thanks, that solves the problem I posted however there were several > situations where I would like to be able to upload a file and after that not > care about it. > > Another example I was wrestling with was uploading a tar.gz then allowing it > to be rem

Re: [Puppet Users] Creation of modifiable files via puppet

2012-10-08 Thread pdurkin
Thanks, that solves the problem I posted however there were several situations where I would like to be able to upload a file and after that not care about it. Another example I was wrestling with was uploading a tar.gz then allowing it to be removed afterwards. I want it uploaded so that I ca

Re: [Puppet Users] Creation of modifiable files via puppet

2012-10-08 Thread Peter Brown
Hi, The best way to do that is to modify the system skeleton files and make sure useradd is using them. They get put in user homedirs when the account gets created. On 9 October 2012 15:19, pdurkin wrote: > I've been looking around but can't seem to find an answer to this. > > I would like to cr

[Puppet Users] Creation of modifiable files via puppet

2012-10-08 Thread pdurkin
I've been looking around but can't seem to find an answer to this. I would like to create a file whose initial contents come from the default in the puppet server but is subsequently modifiable and puppet won't overwrite any changes. The reason for this is that if I deploy a user account via pu