[Puppet Users] Re: Massive Import/Include

2012-10-05 Thread pierre-emmanuel degand
As regards your 3 proposals :

   - that it would probably all need to go into one YAML file = it will 
   be the same than insert all my config in the manifest.pp, and it's not 
   interesting to me
   - you could put it in an hiera data store = i don't know this method 
   yet
   - You could write a custom function that reads the directory = i 
   think it's the better choice
   
Thanks for answering. 

-- 
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/-/qF7rOFmRyMAJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Massive Import/Include

2012-09-28 Thread pierre-emmanuel degand
Hi, I try to include or import a lot of configuration files in a node, but 
it doesn't work :/

I create a module to configure bind, but i have a lot of domains to 
configure in the node of my server, so i decided to create an other module 
just to register my configuration with 1 file per domain (i have around 200 
domains, so arount 200 files...). 

My tree (for the configuration module) : 
module/

conf_bind/

manifests/

init.pp

 bind/

domain1_conf.pp

...

domain200_conf.pp


Init.pp :
class conf_bind {
}

I tried  import 'bind/*.pp'  , but it worked only once on my VM... The 
only solution i have now it's to include my domain*_conf one by one, but 
i'll be very long...

If someone got an idea :) thanks

 

 

 



-- 
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/-/U8UbkO-hf2IJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Massive Import/Include

2012-09-28 Thread pierre-emmanuel degand
my module bind : 
- init.pp :
class bind {
include bind::install
include bind::service
}

-install.pp :
class bind::install (
$packages = $bind::params::server_packages
) inherits bind::params {
 package { $packages : 
ensure = present,
}

file { /etc/bind/zones:
ensure  = directory,
owner   = root,
group   = root,
mode= 0755,
}

file { /etc/bind/named.conf.local:
owner = root,
group = root,
mode = 0644,
source = puppet:///modules/bind/named.conf.local,
}

}

service.pp :
class bind::service (
$service = $bind::params::server_services
) inherits bind::params {
 service { $service :
enable = true,
ensure   = running,
hasrestart = true,
hasstatus  = true,
}
}

params.pp :
class bind::params {
 $server_packages = [bind9]
$server_services = bind9
}

config.pp (the one i use to configure each domain) :
define bind::config ($dns_server = $fqdn,
$domain,
$type_ip = A,
$ip_serv = '',
$type_ip2 = $type_ip,
$ip_serv2 = $ip_serv,
$sub_domain='',
$mx=false,
$ip_mx1 = xxx.xxx.xxx.xxx,
$domain_mx1 = $domain,
$type_mx1 = A,
$ip_mx2 = xxx.xxx.xxx.xxx,
$domain_mx2 = $domain_mx1,
$type_mx2 = A,
$ip_ns1 = xxx.xxx.xxx.xxx,
$type_ns1 = A,
$ip_ns2 = xxx.xxx.xxx.xxx,
$type_ns2 = A,
$ip_ns3 = xxx.xxx.xxx.xxx,
$type_ns3 = A,
$www = true
){

include bind
 file { /etc/bind/zones/${domain}.db:
content = template(bind/zone.db.erb),
owner = root,
group = root,
mode = 0644,
} 
}


And for each domainX_conf.pp :
class conf_bind::bind_domain_fr {
 bind::config { domain.fr:
   domain = domain.fr,
   ip_serv = xxx.xxx.xxx.xxx,
   sub_domain = [domain.fr. IN MX 20 mx2.ovh.net.,
domain.fr. IN MX 10 mx1.ovh.net.,
domain.fr. IN MX 100 mxb.ovh.net.,
domain.fr. IN TXT \v=spf1 
ip4:xxx.xxx.xxx.xxx ip4:xxx.xxx.xxx.xxx -all\,
subdomain1 IN A xxx.xxx.xxx.xxx,
subdomain2 IN A xxx.xxx.xxx.xxx,
pop3 IN CNAME ns0.ovh.net.,
],
   }
}

At the beginning, all the configuration was in the node.pp, but i had too 
much ligns so i split all the configuration like that...

Then in the module's init.pp you would have:

class conf_bind {
  include 'conf_bind::bind::domain1_conf'
  include 'conf_bind::bind::domain2_conf'
  # ...
  include 'conf_bind::bind::domain200_conf'
} == it's what i want to avoid :s

-- 
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/-/kOvfDx8vZBYJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet gets stuck + CRON

2012-07-16 Thread pierre-emmanuel degand
Hi,

I use Cron to avoid puppet to get stuck with this command : /bin/echo  | 
/bin/nc localhost 8139
But I get this error : /USR/SBIN/CRON[11065]: (CRON) error (grandchild 
#11068 failed with exit status 1)

At the beginning, i launched : echo  | nc localhost 8139, but I read that 
we have to put the path with the lastest cron version. 

sudo uname -a
Linux #.com 2.6.38.2-grsec--grs-ipv6-64 #2 SMP Thu Aug 25 
16:40:22 UTC 2011 x86_64 GNU/Linux

If someone get an idea :)

-- 
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/-/WQszVVuu7BYJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Node not find

2012-07-09 Thread pierre-emmanuel degand


 *
 *
 It's save in vpsX.ovh.net.pp in puppet/manifests/nodes and in my 
 site.pp i include 


 did you mean import?


yes sorry, it's an import

i don't know what happens because this morning i had tried and it works... 

thanks for answering :)

-- 
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/-/DVqJo9C6984J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Node not find

2012-07-06 Thread pierre-emmanuel degand
Hi, my new server doesn't find his node *whereas i did the same for my 
others servers and it works on them*. My key is generated and signed by my 
master (i had had to add my puppetmaster in /etc/hosts).

My node : 

*node 'vpsX.ovh.net' {
*
*
*
*}*
*
*
It's save in vpsX.ovh.net.pp in puppet/manifests/nodes and in my 
site.pp i include nodes/* .

When i use : puppet agent --test, i got this error : 
*err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find default node or by name with 'vpsX.ovh.net, 
vpsX.ovh, vpsX' on node vpsX.ovh.net*
*warning: Not using cache on failed catalog*
*err: Could not retrieve catalog; skipping run*
*
*
Any help would be appreciated :)*
*
*
*
*
*
*
*
*
*

-- 
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/-/i3QJSF8PFlUJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.