I´m trying to utilize the new stdlib module, but got stuck after
installation on my puppet server.
I´ve tried to use the included test file file_line.pp on the server, but
it´s only creating the file - but not managing the content.
the same problem on my clients (the new provider file_line has been
synced), it´s just not working:
file_line { ''puppet master host entry'':
line => ''172.16.240.200 master.dev.puppetlabs.com
master'',
path => ''/etc/hosts'',
}
do you have any Ideas what´s wrong?
thanks
,
Stefan
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/0o7HAJOKmD8J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Why not use host instead of file_line ?
http://docs.puppetlabs.com/references/latest/type.html#host
host { ''puppet master host entry'':
ip => ''172.16.240.200'',
name => ''master.dev.puppetlabs.com'',
host_aliases => [''master''],
}
On Mar 29, 2012, at 11:08 AM, Stefan Wiederoder wrote:
> I´m trying to utilize the new stdlib module, but got stuck after
installation on my puppet server.
>
> I´ve tried to use the included test file file_line.pp on the server, but
it´s only creating the file - but not managing the content.
>
> the same problem on my clients (the new provider file_line has been
synced), it´s just not working:
>
> file_line { ''puppet master host entry'':
> line => ''172.16.240.200
master.dev.puppetlabs.com master'',
> path => ''/etc/hosts'',
> }
>
> do you have any Ideas what´s wrong?
>
> thanks
> ,
> Stefan
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Stefan, Looks related to https://projects.puppetlabs.com/issues/13530, which I just opened. Make sure you ensure => present in the file_line resource. -Eric -- Eric Shamow Professional Services http://puppetlabs.com/ (c)631.871.6441 On Thursday, March 29, 2012 at 6:17 PM, Dan White wrote:> Why not use host instead of file_line ? > > http://docs.puppetlabs.com/references/latest/type.html#host > > host { ''puppet master host entry'': > ip => ''172.16.240.200'', > name => ''master.dev.puppetlabs.com (http://master.dev.puppetlabs.com)'', > host_aliases => [''master''], > } > > On Mar 29, 2012, at 11:08 AM, Stefan Wiederoder wrote: > > > I´m trying to utilize the new stdlib module, but got stuck after installation on my puppet server. > > > > I´ve tried to use the included test file file_line.pp on the server, but it´s only creating the file - but not managing the content. > > > > the same problem on my clients (the new provider file_line has been synced), it´s just not working: > > > > file_line { ''puppet master host entry'': > > line => ''172.16.240.200 master.dev.puppetlabs.com (http://master.dev.puppetlabs.com) master'', > > path => ''/etc/hosts'', > > } > > > > do you have any Ideas what´s wrong? > > > > thanks > > , > > Stefan > > > > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com (mailto:puppet-users@googlegroups.com). > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com (mailto:puppet-users+unsubscribe@googlegroups.com). > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
thanks Eric,
ensure did the trick, now I´m stuck while trying to use a facter variable
within the line statement:
file_line { "tmpfs entry":
line => "tmpfs /dev/shm tmpfs size=${kis_tmpfs_size} 0
0",
path => "/etc/fstab.d/system.fstab",
ensure => present
}
maybe it´s better to try validate_string.
bye
,
Stefan
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/jUW5dAbHOEsJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
On 30 March 2012 20:18, Stefan Wiederoder <stefanwiederoder@googlemail.com>wrote:> thanks Eric, > > ensure did the trick, now I´m stuck while trying to use a facter variable > within the line statement: > > file_line { "tmpfs entry": > line => "tmpfs /dev/shm tmpfs size=${kis_tmpfs_size} 0 0", > path => "/etc/fstab.d/system.fstab", > ensure => present > } > > maybe it´s better to try validate_string. >Per Dan White - you should be using puppet built in resources for the job: the "host" resource for modifying /etc/hosts and the "mount" resource for modifying /etc/fstab - http://docs.puppetlabs.com/references/latest/type.html I define $tmpfs_size elsewhere mount{ "/tmp": ensure => mounted, device => "tmpfs", fstype => "tmpfs", pass => "0", dump => "0", options => "size=${tmpfs_size}m,mode=1777", } John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.