Skip to content
Snippets Groups Projects
Commit cba541af authored by Henrik Henriksson's avatar Henrik Henriksson
Browse files

Get to work

parent 1c702214
No related branches found
No related tags found
No related merge requests found
[submodule "modules/stdlib"]
path = modules/stdlib
url = https://github.com/puppetlabs/puppetlabs-stdlib
[submodule "modules/ntp"]
path = modules/ntp
url = https://github.com/puppetlabs/puppetlabs-ntp
[submodule "modules/nginx"]
path = modules/nginx
url = https://github.com/voxpupuli/puppet-nginx.git
[submodule "modules/concat"]
path = modules/concat
url = https://github.com/puppetlabs/puppetlabs-concat
node 'holgerspexet' {
include ::holger
}
Subproject commit 5ae070b67a0e49b4490f422771a5834e664091de
#!/bin/bash
# This script fetches the puppet configuration for
# holgerspexet.lysator.liu.se from github and applies it
#
# Make sure to add the servers public key as a github deploy key
export HOME=/root/
# Initialize repo if not already there
if [ ! -d /opt/holger-puppet ]; then
git clone --recursive git@github.com:holgerspexet/holger-puppet.git /opt/holger-puppet > /dev/null || exit 1
fi
# Update repo
cd /opt/holger-puppet || exit 1
git pull > /dev/null || exit 1
git submodule update --recursive --remote > /dev/null || exit 1
# Run puppet and hope all is well
puppet apply --modulepath=/opt/holger-puppet/modules/ /opt/holger-puppet/manifests/site.pp
class holger {
include ntp
include ::holger::puppetfetch
class { '::lyslogclient': }
}
class holger::puppetfetch {
file { '/opt/puppetfetcher.sh':
owner => 'root',
group => 'root',
mode => '744',
source => 'puppet:///modules/holger/puppetfetcher.sh',
}
cron { 'puppetfetcher':
ensure => present,
command => '/opt/puppetfetcher.sh',
user => root,
minute => 55,
}
}
# /etc/rsyslog.conf Configuration file for rsyslog.
#
# For more information see
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#
# Default logging rules can be found in /etc/rsyslog.d/50-default.conf
# These are currently not loaded
#################
#### MODULES ####
#################
$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog # provides kernel logging support (previously done by rklogd)
#$ModLoad immark # provides --MARK-- message capability
# provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514
# provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514
###########################
#### GLOBAL DIRECTIVES ####
###########################
#
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
#
# Set the default permissions for all log files.
#
$FileOwner root
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
#
# Where to place spool and state files
#
$WorkDirectory /var/spool/rsyslog
#
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf
###############
#### RULES ####
###############
#
# First some standard log files. Log by facility.
#
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
#cron.* /var/log/cron.log
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
lpr.* -/var/log/lpr.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
#
# Logging for the mail system. Split it up so that
# it is easy to write scripts to parse these files.
#
mail.info -/var/log/mail.info
mail.warn -/var/log/mail.warn
mail.err /var/log/mail.err
#
# Logging for INN news system.
#
news.crit /var/log/news/news.crit
news.err /var/log/news/news.err
news.notice -/var/log/news/news.notice
#
# Some "catch-all" log files.
#
*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
cron,daemon.none;\
mail,news.none -/var/log/messages
#
# Emergencies are sent to everybody logged in.
#
*.emerg *
#
# I like to have messages displayed on the console, but only on a virtual
# console I usually leave idle.
#
#daemon,mail.*;\
# news.=crit;news.=err;news.=notice;\
# *.=debug;*.=info;\
# *.=notice;*.=warn /dev/tty8
# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
# you must invoke `xconsole' with the `-file' option:
#
# $ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
# busy site..
#
daemon.*;mail.*;\
news.err;\
*.=debug;*.=info;\
*.=notice;*.=warn |/dev/xconsole
*.* @loghost.lysator.liu.se
class lyslogclient
{
file {
'/etc/rsyslog.conf':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/lyslogclient/rsyslogd.conf';
}
service {
'rsyslog':
ensure => 'running',
enable => true,
pattern => 'syslog',
subscribe => File['/etc/rsyslog.conf'];
}
cron {
'syslog_mark':
ensure => present,
command => '/usr/bin/logger mark',
user => root,
minute => 43,
}
}
Subproject commit 705c19b1b5c03e52416200c411a171d5009e61db
Subproject commit 572f4c10c42f06d59e8b67ab85845b327a7891e8
Subproject commit d1706fef8802095b2f3520511326f9c2924a6b21
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment