From 5f291e445bf9afff3e4e031a2979d3ec6f2e228d Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 16 Jul 2011 16:24:14 -0400 Subject: [PATCH] Added def for burrow and for adding ppas. --- manifests/burrow.pp | 9 +++++++++ manifests/ppa.pp | 27 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 manifests/burrow.pp create mode 100644 manifests/ppa.pp diff --git a/manifests/burrow.pp b/manifests/burrow.pp new file mode 100644 index 0000000000..5600bbc52c --- /dev/null +++ b/manifests/burrow.pp @@ -0,0 +1,9 @@ +import "openstack_ci_admins_users" +import "static_users" +import "jenkins_slave" + +node default { + include openstack_ci_admins_users + include static_users + include jenkins_slave +} diff --git a/manifests/ppa.pp b/manifests/ppa.pp new file mode 100644 index 0000000000..891684b8fb --- /dev/null +++ b/manifests/ppa.pp @@ -0,0 +1,27 @@ +define ppa($ensure = present) { + case $ensure { + present: { + exec { "Add $name PPA": + path => "/bin:/usr/bin", + environment => "HOME=/root", + command => "add-apt-repository $name", + user => "root", + group => "root", + logoutput => on_failure, + } + } + absent: { + exec { "Add $name PPA": + path => "/bin:/usr/bin", + environment => "HOME=/root", + command => "add-apt-repository --remove $name", + user => "root", + group => "root", + logoutput => on_failure, + } + } + default: { + fail "Invalid 'ensure' value '$ensure' for ppa" + } + } +}