[submodule "modules/ssh_keygen"]
path = modules/ssh_keygen
url = git://git.immae.eu/github/voxpupuli/puppet-ssh_keygen
+[submodule "modules/xmpp"]
+ path = modules/xmpp
+ url = git://git.immae.eu/github/jamtur01/puppet-xmpp
[submodule "modules/ssl"]
path = modules/ssl
url = git://git.immae.eu/github/fnerdwq/puppet-ssl
base_installation::system_locales: ["fr_FR.UTF-8", "en_US.UTF-8"]
base_installation::system_timezone: "Europe/Paris"
base_installation::system_users: [] # Fetched via ldap
+base_installation::notify_xmpp: {}
profile::fstab::mounts:
- "%{facts.ldapvar.self.vars.mounts.0}"
- "%{facts.ldapvar.self.vars.mounts.1}"
install_options => "--no-user-install"
}
+ package { 'gem:xmpp4r':
+ name => "xmpp4r",
+ ensure => present,
+ provider => "gem",
+ install_options => "--no-user-install"
+ }
+
file { $password_seed:
mode => "0600",
}
file { $base_installation::puppet_conf_path:
ensure => directory,
- require => [Package["puppet"], Package["gem:ruby-ldap"]],
+ require => [Package["puppet"], Package["gem:xmpp4r"], Package["gem:ruby-ldap"]],
recurse => true,
purge => true,
force => true,
}
+ $xmpp = lookup("base_installation::notify_xmpp", { "default_value" => {} })
+
file { "$base_installation::puppet_conf_path/puppet.conf":
content => template("base_installation/puppet/puppet.conf.erb"),
require => File[$base_installation::puppet_conf_path],
}
+ unless empty($xmpp) {
+ file { "$base_installation::puppet_conf_path/xmpp.yaml":
+ content => template("base_installation/puppet/xmpp.yaml.erb"),
+ require => File[$base_installation::puppet_conf_path],
+ }
+ }
+
$ips = lookup("ips", { 'default_value' => undef })
file { "$base_installation::puppet_conf_path/host_ldap.info":
content => template("base_installation/puppet/host_ldap.info.erb"),
--- /dev/null
+:xmpp_password: "<%= @xmpp["password"] %>"
+:xmpp_jid: "<%= @xmpp["jid"] %>/<%= @real_hostname %>"
+:xmpp_target: "<%= @xmpp["target"] %>"
+<% if @xmpp["statuses"].is_a?(String) %>
+:xmpp_statuses: "<%= @xmpp["statuses"] %>"
+<% else %>
+:xmpp_statuses:
+<% @xmpp["statuses"].each do |status| %>
+ - <%= status %>
+<% end %>
+<% end %>