PUPPET » Historique » Version 3
« Précédent -
Version 3/69
(diff) -
Suivant » -
Version actuelle
Mehdi Abaakouk, 02/01/2012 17:02
master of puppet¶
Ajout d'une machine:¶
Sur le client:
$ apt-get install puppet
dans /etc/default/puppet mettre:
START=yes
et dans /etc/puppet/puppet.conf ajouter:
[agent] server=puppet.tetaneutral.net
Ensuite ajouter la machine dans le puppet master, MOUAHAHA:
Sur le client:
$ puppet agent --test warning: peer certificate won't be verified in this SSL session warning: peer certificate won't be verified in this SSL session warning: peer certificate won't be verified in this SSL session Exiting; no certificate found and waitforcert is disabled
Sur le serveur:
$ puppetca --list www.tetaneutral.net $ puppetca --sign --all notice: Signed certificate request for www.tetaneutral.net notice: Removing file Puppet::SSL::CertificateRequest www.tetaneutral.net at '/var/lib/puppet/ssl/ca/requests/www.tetaneutral.net.pem'
Sur le client:
$ puppet agent --test warning: peer certificate won't be verified in this SSL session info: Caching certificate for www.tetaneutral.net info: Caching certificate_revocation_list for ca info: Caching catalog for www.tetaneutral.net info: Applying configuration version '1325516709' info: Creating state file /var/lib/puppet/state/state.yaml notice: Finished catalog run in 0.01 seconds
Liens:¶
http://madeinsyria.fr/2011/06/howto-puppet-administration-et-industrialisation-de-masse/
Ajout d'un module (ie: un truc/service/user a configurer), ici module motdpour l'exemple :¶
Création du module¶
cd /etc/puppet/modules mkdir -p motd/{files,lib,manifests,templates,tests} $ cat motd/manifests/init.pp class motd { file {'motd': ensure => file, path => '/etc/motd.tail', mode => 0644, content => "Bienvenue sur ${::hostname}, machine de l'infrastructure ${::domain}\n\nCette machine est geree par puppet toutes modifications effectuee est suceptible d'etre perdu." } }
Ajout du module à la liste des modules disponibles¶
$ cat manifests/modules.pp import "backup" import "motd"
Utilisation du module pour une node¶
$ cat manifests/nodes.pp node basenode { include backup include motd } node 'www.tetaneutral.net' inherits basenode { }
Installation¶
Installation du paquet:
$ apt-get install puppetmaster
Dans /etc/puppet/puppet.conf mettre le nom du serveur puppetmaster:
[master] certname=puppet.tetaneutral.net
Dans /etc/puppet/fileserver.conf configurer les autorisations:
[files] path /etc/puppet/files allow 91.224.149.0/24 allow 91.224.148.0/24