aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl/puppet-reset-master
blob: 5a4386e08be761f0b3fdd8a231673b896ce25eea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
#
# Reset puppet master and start over again.
#

# Stop services  
/etc/init.d/puppet stop
/etc/init.d/puppetmaster stop
/etc/init.d/nginx stop

# Reset configuration
hydractl puppet-reset-stored
rm -rf /var/lib/puppetmaster/ssl

# Get fresh config
rm -rf /etc/puppet/ && git clone /var/git/repositories/puppet.git/ /etc/puppet
( cd /etc/puppet/ && git submodule update --init )
chown -R puppet.puppet /etc/puppet/

# Start services
/etc/init.d/puppetmaster start
sleep 5
/etc/init.d/nginx start