Re: [Puppet Users] Conditional with find_file

2020-01-21 Thread Ben Ford
On Tue, Jan 21, 2020 at 11:54 AM Gabriel Filion wrote: > On 2020-01-20 2:34 a.m., Joaquin Veira wrote: > > I understand what you mean but I guess there must be any way to check if > I > > file exists on the client and act in consecuence. > > > > I mean, if I want to identify a MySQL server by the

Re: [Puppet Users] Conditional with find_file

2020-01-21 Thread Joaquin Veira
I understand. thank you both for your help. El mar., 21 ene. 2020 20:54, Gabriel Filion escribió: > On 2020-01-20 2:34 a.m., Joaquin Veira wrote: > > I understand what you mean but I guess there must be any way to check if > I > > file exists on the client and act in consecuence. > > > > I mean,

Re: [Puppet Users] Conditional with find_file

2020-01-21 Thread Gabriel Filion
On 2020-01-20 2:34 a.m., Joaquin Veira wrote: > I understand what you mean but I guess there must be any way to check if I > file exists on the client and act in consecuence. > > I mean, if I want to identify a MySQL server by the existance of > /etc/my.cnf and execute a systemctl enable mysql &

Re: [Puppet Users] Conditional with find_file

2020-01-19 Thread Joaquin Veira
Hi Ben, I understand what you mean but I guess there must be any way to check if I file exists on the client and act in consecuence. I mean, if I want to identify a MySQL server by the existance of /etc/my.cnf and execute a systemctl enable mysql && systemctl start mysql that should work, righ

Re: [Puppet Users] Conditional with find_file

2020-01-17 Thread Ben Ford
> > But when I execute this from a server-client infrastructure it seems like > the conditionals don't work They are not even processed: Oh, they're processed just the same. But the key part that you've missed is that the catalog is compiled on the *master*. That's where all functions run. The ca

[Puppet Users] Conditional with find_file

2020-01-17 Thread Joaquin Veira
Hi, I'm trying to use a condition based on the existance of a file. Something like this: if find_file('/etc/if_this_file_exists') { file { '/etc/create_this_file': ensure => present, owner => 'root', group => 'root', mode => '0755',