Page MenuHomeSoftware Heritage

No OneTemporary

diff --git a/manifests/puppet/agent.pp b/manifests/puppet/agent.pp
index 14447c2..cbbb4ca 100644
--- a/manifests/puppet/agent.pp
+++ b/manifests/puppet/agent.pp
@@ -1,10 +1,26 @@
# Puppet agent profile
class profile::puppet::agent {
$puppetmaster = hiera('puppet::master::hostname')
class { '::puppet':
runmode => 'none',
pluginsync => true,
puppetmaster => $puppetmaster,
}
+
+ file { '/usr/local/sbin/swh-puppet-test':
+ ensure => 'file',
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ content => template('profile/puppet/swh-puppet-test.sh.erb'),
+ }
+
+ file { '/usr/local/sbin/swh-puppet-apply':
+ ensure => 'file',
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ content => template('profile/puppet/swh-puppet-apply.sh.erb'),
+ }
}
diff --git a/manifests/puppet/master.pp b/manifests/puppet/master.pp
index c445e1b..6dcba8c 100644
--- a/manifests/puppet/master.pp
+++ b/manifests/puppet/master.pp
@@ -1,17 +1,26 @@
# Puppet master profile
class profile::puppet::master {
$puppetmaster = hiera('puppet::master::hostname')
class { '::puppet':
server => true,
server_parser => 'future',
server_foreman => false,
server_environments => [],
server_passenger => true,
server_storeconfigs_backend => 'active_record',
runmode => 'none',
pluginsync => true,
puppetmaster => $puppetmaster,
}
+
+ file { '/usr/local/sbin/swh-puppet-master-deploy':
+ ensure => 'file',
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ content => template('profile/puppet/swh-puppet-master-deploy.sh.erb'),
+ }
+
}
diff --git a/templates/puppet/swh-puppet-apply.sh.erb b/templates/puppet/swh-puppet-apply.sh.erb
new file mode 100644
index 0000000..16bb64a
--- /dev/null
+++ b/templates/puppet/swh-puppet-apply.sh.erb
@@ -0,0 +1,4 @@
+#!/bin/bash
+# This file is managed by puppet. Local modifications will be overwritten.
+
+puppet agent --test
diff --git a/templates/puppet/swh-puppet-master-deploy.sh.erb b/templates/puppet/swh-puppet-master-deploy.sh.erb
new file mode 100644
index 0000000..b813a30
--- /dev/null
+++ b/templates/puppet/swh-puppet-master-deploy.sh.erb
@@ -0,0 +1,4 @@
+#!/bin/bash
+# This file is managed by puppet. Local modifications will be overwritten.
+
+/etc/puppet/environments/production/deploy.sh -v
diff --git a/templates/puppet/swh-puppet-test.sh.erb b/templates/puppet/swh-puppet-test.sh.erb
new file mode 100644
index 0000000..569adca
--- /dev/null
+++ b/templates/puppet/swh-puppet-test.sh.erb
@@ -0,0 +1,4 @@
+#!/bin/bash
+# This file is managed by puppet. Local modifications will be overwritten.
+
+puppet agent --test --noop

File Metadata

Mime Type
text/x-diff
Expires
Fri, Jul 4, 12:18 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3255711

Event Timeline