John Smith
2013-Mar-21 20:09 UTC
[Puppet Users] syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
I''m trying to use Keith Burdis''s excellent erwbgy/system module without Hiera, at least initially. http://forge.puppetlabs.com/erwbgy/system I cannot determine how call the modules. From what I can tell the documentation isn''t quite correct (or I am reading it wrong). I''m trying to start with ntp because that''s an easy to understand example. https://github.com/erwbgy/puppet-ntp The ntp documentation says <snip> Specify a list of time servers to use: class { ''ntp'': servers => [ ''ntp1.domain.com'', ''ntp2.domain.com'' ], } <endsnip> If I enter it like this in my manifest, I get errors. I assume the correct syntax is something more like this <snip> system::ntp { ''name'': servers => [ ''ntp1.domain.com'', ''ntp2.domain.com'' ], } <endsnip> but that syntax gets me this error Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type system::ntp at /etc/puppet/manifests/site.pp:36 on node Any help with this would be appreciated.. thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Byron Miller
2013-Mar-21 20:15 UTC
[Puppet Users] Re: syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
i replied to your post over in foreman :) you can also search for my "i can''t wrap my head around hiera" post for more details too. On Thursday, March 21, 2013 3:09:02 PM UTC-5, John Smith wrote:> > I''m trying to use Keith Burdis''s excellent erwbgy/system module without > Hiera, at least initially. > > http://forge.puppetlabs.com/erwbgy/system > > I cannot determine how call the modules. From what I can tell the > documentation isn''t quite correct (or I am reading it wrong). I''m trying > to start with ntp because that''s an easy to understand example. > > https://github.com/erwbgy/puppet-ntp > > The ntp documentation says > > <snip> > Specify a list of time servers to use: > > class { ''ntp'': > servers => [ ''ntp1.domain.com'', ''ntp2.domain.com'' ], > } > <endsnip> > > If I enter it like this in my manifest, I get errors. I assume the correct > syntax is something more like this > > <snip> > system::ntp { ''name'': > servers => [ ''ntp1.domain.com'', ''ntp2.domain.com'' ], > } > <endsnip> > > but that syntax gets me this error > Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid > resource type system::ntp at /etc/puppet/manifests/site.pp:36 on node > > Any help with this would be appreciated.. > thanks! > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Ellison Marks
2013-Mar-21 20:58 UTC
[Puppet Users] Re: syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
And just to have an answer on the list as well, the syntax in the docs is correct. Though it might be class { "system::ntp" in your case. Not sure of the specifics of that module. http://docs.puppetlabs.com/puppet/3/reference/lang_classes.html#using-resource-like-declarations On Thursday, March 21, 2013 1:09:02 PM UTC-7, John Smith wrote:> > I''m trying to use Keith Burdis''s excellent erwbgy/system module without > Hiera, at least initially. > > http://forge.puppetlabs.com/erwbgy/system > > I cannot determine how call the modules. From what I can tell the > documentation isn''t quite correct (or I am reading it wrong). I''m trying > to start with ntp because that''s an easy to understand example. > > https://github.com/erwbgy/puppet-ntp > > The ntp documentation says > > <snip> > Specify a list of time servers to use: > > class { ''ntp'': > servers => [ ''ntp1.domain.com'', ''ntp2.domain.com'' ], > } > <endsnip> > > If I enter it like this in my manifest, I get errors. I assume the correct > syntax is something more like this > > <snip> > system::ntp { ''name'': > servers => [ ''ntp1.domain.com'', ''ntp2.domain.com'' ], > } > <endsnip> > > but that syntax gets me this error > Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid > resource type system::ntp at /etc/puppet/manifests/site.pp:36 on node > > Any help with this would be appreciated.. > thanks! > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
John Smith
2013-Mar-21 21:10 UTC
[Puppet Users] Re: syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
On Thursday, March 21, 2013 1:58:10 PM UTC-7, Ellison Marks wrote:> And just to have an answer on the list as well, the syntax in the docs is > correct. Though it might be class { "system::ntp" in your case. Not sure of > the specifics of that module. > > > http://docs.puppetlabs.com/puppet/3/reference/lang_classes.html#using-resource-like-declarations > > >> I''m just trying to call his ntp module now and have removed system. Istill can''t make it work... Here''s my code <snip> include ntp class ntp { ''ntp'': servers => [ ''ntp1.domain.com'', ''ntp2.domain.com'' ], } <endsnip> and here''s my error: Could not parse for environment dev: Syntax error at '':''; expected ''}'' at /etc/puppet/manifests/site.pp:35 on node -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Ellison Marks
2013-Mar-21 23:24 UTC
[Puppet Users] Re: syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
On Thursday, March 21, 2013 2:10:20 PM UTC-7, John Smith wrote:> > On Thursday, March 21, 2013 1:58:10 PM UTC-7, Ellison Marks wrote: > >> And just to have an answer on the list as well, the syntax in the docs is >> correct. Though it might be class { "system::ntp" in your case. Not sure of >> the specifics of that module. >> >> >> http://docs.puppetlabs.com/puppet/3/reference/lang_classes.html#using-resource-like-declarations >> >> >>> I''m just trying to call his ntp module now and have removed system. I > still can''t make it work... Here''s my code > > <snip> > include ntp > > class ntp { ''ntp'': >This syntax is incorrect. Not "class ntp { ''ntp''". Just "class { ''ntp''", like it says in the docs. If that''s giving you an error, post it.> servers => [ ''ntp1.domain.com'', ''ntp2.domain.com'' ], > } > <endsnip> > > and here''s my error: > Could not parse for environment dev: Syntax error at '':''; expected ''}'' at > /etc/puppet/manifests/site.pp:35 on node > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
John Smith
2013-Mar-22 15:46 UTC
[Puppet Users] Re: syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
thank you very much!!! working much better now :) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Keith Burdis
2013-Mar-22 15:54 UTC
Re: [Puppet Users] Re: syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
Good news. I''d encourage people to file bug or feature requests on GitHub if they run into problems or have ideas for improvements. Tutorial documentation is coming Real Soon Now (TM) :-) - Keith On 22 March 2013 15:46, John Smith <burnncrashnow@gmail.com> wrote:> thank you very much!!! > working much better now :) > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
John Smith
2013-Mar-22 18:46 UTC
Re: [Puppet Users] Re: syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
On Friday, March 22, 2013 8:54:50 AM UTC-7, Keith Burdis wrote:> > Good news. I''d encourage people to file bug or feature requests on GitHub > if they run into problems or have ideas for improvements. Tutorial > documentation is coming Real Soon Now (TM) :-) > > - Keith >Keith, What''s the equivalent non-hiera command to use ntp with your system module instead? If I try class { ''system::ntp'': servers => [ ''ntp1.domain.com'' ], } I get Invalid parameter servers at /etc/puppet/manifests/site.pp:36 Thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Keith Burdis
2013-Mar-23 05:04 UTC
Re: [Puppet Users] Re: syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
Most of the classes take a config hash parameter so this would be: $ntp = { ''servers'' => [''ntp1.domain.com''], } class { ''system::ntp'': config => $ntp, } I use this internally and Byron showed me an example of how he used it with Foreman. - Keith On 22 March 2013 18:46, John Smith <burnncrashnow@gmail.com> wrote:> > > On Friday, March 22, 2013 8:54:50 AM UTC-7, Keith Burdis wrote: >> >> Good news. I''d encourage people to file bug or feature requests on >> GitHub if they run into problems or have ideas for improvements. Tutorial >> documentation is coming Real Soon Now (TM) :-) >> >> - Keith >> > Keith, > > What''s the equivalent non-hiera command to use ntp with your system module > instead? > > If I try > class { ''system::ntp'': servers => [ ''ntp1.domain.com'' ], } > I get > Invalid parameter servers at /etc/puppet/manifests/site.pp:36 > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
John Smith
2013-Mar-25 22:17 UTC
Re: [Puppet Users] Re: syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
On Friday, March 22, 2013 10:04:28 PM UTC-7, Keith Burdis wrote:> Most of the classes take a config hash parameter so this would be: > > $ntp = { > ''servers'' => [''ntp1.domain.com''], > } > > class { ''system::ntp'': > config => $ntp, > } > > I use this internally and Byron showed me an example of how he used it > with Foreman. > > - Keith >Works - Thanks again! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
John Smith
2013-Mar-27 23:01 UTC
Re: [Puppet Users] Re: syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
I''m now trying to use system::sshd. I can see that sshd takes a hash as a parameter instead of an array. However, all my attempts to guess or otherwise determine the correct syntax are failing. Here''s what I''ve got so far $sshd = { ''AllowGroups'' : value => [''root'' , ''IT'', ''ENG''], } class { ''system::sshd'': config => $sshd, } and I get the error: Could not parse for environment dev: Syntax error at ''AllowGroups''; expected ''}'' at /etc/puppet/manifests/site.pp:58 Thanks again in advance... -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
John Smith
2013-Mar-27 23:34 UTC
Re: [Puppet Users] Re: syntax problems trying to use Keith Burdis''s erwbgy/system module without Hiera
On Wednesday, March 27, 2013 4:01:12 PM UTC-7, John Smith wrote:> I''m now trying to use system::sshd. > I can see that sshd takes a hash as a parameter instead of an array. > However, all my attempts to guess or otherwise determine the correct > syntax are failing. > Here''s what I''ve got so far > > $sshd = { > ''AllowGroups'' : > value => [''root'' , ''IT'', ''ENG''], > } > class { ''system::sshd'': > config => $sshd, > } > > and I get the error: > Could not parse for environment dev: Syntax error at ''AllowGroups''; > expected ''}'' at /etc/puppet/manifests/site.pp:58 > > Thanks again in advance... >I gave up too soon... here is the correct syntax: $sshd = { ''AllowGroups'' => { ''value'' => [''root'' , ''IT'', ''ENG''] }, ''PermitRootLogin'' => { ''value'' => ''yes'' } } class { ''system::sshd'': config => $sshd, } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.