Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wattsworth
/
puppet
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
616e98bb
authored
May 29, 2019
by
source_reader
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
modified cleanup script for rpi
parent
20657e5b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
16 deletions
modules/apache/manifests/init.pp
modules/joule/manifests/init.pp
modules/python/manifests/init.pp
rpi_cleanup.sh
modules/apache/manifests/init.pp
View file @
616e98bb
...
...
@@ -21,18 +21,6 @@ class apache {
refreshonly
=>
true
}
package
{
'libapache2-mod-passenger'
:
ensure
=>
present
,
require
=>
Exec
[
'add-repo'
],
notify
=>
Exec
[
'enable-passenger'
]
}
exec
{
'enable-passenger'
:
command
=>
'/usr/sbin/a2enmod passenger'
,
require
=>
Package
[
'libapache2-mod-passenger'
],
refreshonly
=>
true
,
notify
=>
Exec
[
'apache2ctl restart'
]
}
}
else
{
exec
{
'install-keys'
:
...
...
@@ -43,10 +31,23 @@ class apache {
command
=>
'/bin/true'
,
refreshonly
=>
true
}
notice
(
"omitting passenger key and repo
sitory
on rpi platform"
)
notice
(
"omitting passenger key and repo on rpi platform"
)
}
package
{
'libapache2-mod-passenger'
:
ensure
=>
present
,
require
=>
Exec
[
'add-repo'
],
notify
=>
Exec
[
'enable-passenger'
]
}
exec
{
'enable-passenger'
:
command
=>
'/usr/sbin/a2enmod passenger'
,
require
=>
Package
[
'libapache2-mod-passenger'
],
refreshonly
=>
true
,
notify
=>
Exec
[
'apache2ctl restart'
]
}
package
{
$https_pkgs
:
ensure
=>
present
,
require
=>
Exec
[
'install-keys'
],
...
...
@@ -63,7 +64,7 @@ class apache {
}
exec
{
'apache2ctl restart'
:
path
=>
[
'/usr/sbin'
,
'/usr/bin'
],
require
=>
Package
[
$deps
],
require
=>
Exec
[
'enable-passenger'
,
'enable-rewrite-engine'
],
refreshonly
=>
true
,
}
...
...
modules/joule/manifests/init.pp
View file @
616e98bb
...
...
@@ -27,7 +27,7 @@ class joule {
$dsn
=
'joule:joule@localhost:5432/joule'
exec
{
'initialize_joule'
:
command
=>
"joule initialize --dsn=
${dsn}
"
,
command
=>
"joule
admin
initialize --dsn=
${dsn}
"
,
path
=>
[
'/usr/local/bin'
,
'/usr/sbin'
,
'/bin'
],
creates
=>
'/etc/joule/main.conf'
,
require
=>
Exec
[
'install_joule'
,
...
...
modules/python/manifests/init.pp
View file @
616e98bb
...
...
@@ -25,7 +25,7 @@ class python {
'python-setuptools'
,
'python-cherrypy3'
,
'python-decorator'
,
'python-requests'
,
'python3-dev'
,
'python-dateutil'
,
'python-tz'
,
'python-progressbar'
,
'python-psutil'
,
'python-simplejson'
,
'python3-tk'
,
'python-tk'
]
'python-simplejson'
,
'python3-tk'
,
'python-tk'
,
'libffi-dev'
]
package
{
$deps
:
ensure
=>
present
...
...
rpi_cleanup.sh
0 → 100755
View file @
616e98bb
#!/bin/bash
set
-e
echo
"stopping joule and lumen"
service joule stop
apache2ctl stop
echo
"1] Remove the databases"
sudo
-u
postgres psql
<<
END_OF_SQL
DROP DATABASE joule;
DROP DATABASE rails;
END_OF_SQL
echo
"3] Erasing module and stream configurations"
rm
-f
/etc/joule/module_configs/
*
.conf
rm
-f
/etc/joule/stream_configs/
*
.conf
echo
"4] Removing default key material"
rm
-f
/etc/joule/security/
*
rm
-f
/opt/api/config/secrets.yml
echo
"5] Reverting apt sources"
cat
>
/etc/apt/sources.list
<<
EOF
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
EOF
cat
>
/etc/apt/sources.list.d/raspi.list
<<
EOF
deb http://archive.raspberrypi.org/debian/ stretch main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ stretch main ui
EOF
apt update
echo
"6] Configuring root fs resize for first boot"
cat
>
/boot/cmdline.txt
<<
EOF
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=025ce4e3-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh splash plymouth.ignore-serial-consoles
EOF
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment