Compare commits
468 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0826e9c574 | ||
|
|
3842b34fda | ||
|
|
62e5d4d4ed | ||
|
|
bff1533a51 | ||
| 04946ab23d | |||
| 7ff83fd200 | |||
| 60ec112e6a | |||
|
|
5d36c59cfc | ||
|
|
98fec85ef0 | ||
| 72e7ebe6bf | |||
| 173e3035ab | |||
|
|
6f84c1b512 | ||
|
|
594fb6a795 | ||
| ee701dc865 | |||
|
|
f6978ab036 | ||
| 1bd2215cda | |||
|
|
7d049edc46 | ||
|
|
d7136a7cff | ||
|
|
ab8f56a5de | ||
|
|
fb8bf20241 | ||
|
|
6e6dd9a17c | ||
| 4cf975ec82 | |||
| c5cb03d3a0 | |||
|
|
806e147f7f | ||
|
|
8275707c27 | ||
| 3ef2a772c1 | |||
| 87f96181e7 | |||
|
|
e696934e54 | ||
|
|
3d0e4a6798 | ||
| 6b66e018ea | |||
|
|
0af0d72cdb | ||
|
|
94184df21c | ||
|
|
8510d34e52 | ||
|
|
7a789f14b2 | ||
|
|
ba94323c8d | ||
|
|
5251a0868d | ||
|
|
3a22d8d998 | ||
|
|
032dfa7bee | ||
|
|
619089c29d | ||
|
|
558f550678 | ||
|
|
fb80ce0146 | ||
|
|
b661cdcf84 | ||
|
|
7362670ca0 | ||
|
|
d4edee7b2d | ||
|
|
69ba3ede6c | ||
|
|
bfd78c7b47 | ||
|
|
91287fe52d | ||
|
|
549b40251c | ||
|
|
400c4c93c0 | ||
|
|
4e848abe36 | ||
|
|
b77cdcf5ba | ||
|
|
70fc8191de | ||
|
|
a64d1ecc96 | ||
|
|
36b1448f50 | ||
|
|
e2601924fa | ||
|
|
e800a021f9 | ||
|
|
64f44a26a6 | ||
|
|
0574c8cd46 | ||
|
|
dc5f244579 | ||
|
|
1540739d98 | ||
|
|
792b7e9648 | ||
|
|
b46c65c03b | ||
|
|
4cea2c0879 | ||
|
|
29e3ab2ffd | ||
|
|
e2d462bbda | ||
|
|
85256cb016 | ||
|
|
936bd39c27 | ||
|
|
78e3b57ff1 | ||
|
|
5795acf5d2 | ||
|
|
543334eb32 | ||
|
|
33407af283 | ||
|
|
aa873eaefb | ||
|
|
f58189b5d3 | ||
|
|
020e01d41b | ||
|
|
0ff96f821e | ||
|
|
e391eadd87 | ||
|
|
5deeb572c0 | ||
|
|
0a5dc3e7e8 | ||
|
|
b0d2cd6687 | ||
|
|
5231b65cb5 | ||
|
|
6faf3b2067 | ||
|
|
6a52f7fffa | ||
|
|
5451bc09e0 | ||
|
|
9c50cf6d1f | ||
|
|
ead61fc784 | ||
|
|
28aa04be3f | ||
|
|
6bda8359bc | ||
|
|
4a317743f9 | ||
|
|
ea17d57818 | ||
|
|
db3a534819 | ||
|
|
0e253a0e41 | ||
|
|
07754ec879 | ||
|
|
b37e6b689c | ||
|
|
256ba638ff | ||
|
|
27cd55df69 | ||
|
|
1f43d95e12 | ||
|
|
67e9e1c079 | ||
|
|
29fbfa2f8c | ||
|
|
5380ba36ac | ||
|
|
9fb5422b4b | ||
|
|
525e54aeca | ||
|
|
020de14b86 | ||
|
|
f10f2ef4c0 | ||
|
|
41ac17b901 | ||
|
|
2495ad305c | ||
|
|
db031bb4f7 | ||
|
|
12d9d2c1e0 | ||
|
|
9c218c2519 | ||
|
|
e861e60d4e | ||
|
|
2e907235ac | ||
|
|
cb8b054dd7 | ||
|
|
9b75c8b1a9 | ||
|
|
4d0c499b55 | ||
|
|
5b1a5a837b | ||
|
|
0817da6432 | ||
|
|
0c23d15256 | ||
|
|
d30c555b70 | ||
|
|
5e12339ba0 | ||
|
|
c879f24f47 | ||
|
|
a97e13a8f8 | ||
|
|
e4223d38de | ||
|
|
db13eb3b72 | ||
|
|
146d07b247 | ||
|
|
91e9237224 | ||
|
|
3fa51fa84f | ||
|
|
1e30d7b3c1 | ||
|
|
0193fa080b | ||
|
|
c4665ca34f | ||
|
|
2ad8d87b4b | ||
|
|
908ab10c3d | ||
|
|
0ac3d0e3db | ||
|
|
164845746b | ||
|
|
80447cbf15 | ||
|
|
de1f6f4a41 | ||
|
|
3f6b4beee2 | ||
|
|
451dcbc8b8 | ||
|
|
9f132f5078 | ||
|
|
a1f43ee381 | ||
|
|
f638c9252e | ||
|
|
02c14f9d76 | ||
|
|
16501ec716 | ||
|
|
1fb669e853 | ||
|
|
a85a9386f2 | ||
|
|
308040e07e | ||
|
|
0bf2a5cb41 | ||
|
|
3f56cb9142 | ||
|
|
3f16a0c3eb | ||
|
|
e9cbdb62e2 | ||
|
|
cdcfca47b4 | ||
|
|
ef7f721dd7 | ||
|
|
f347313a26 | ||
|
|
a99617f531 | ||
|
|
5e88c5bc90 | ||
|
|
57a83f7362 | ||
|
|
e663c3fb38 | ||
|
|
86054ec95e | ||
|
|
f9ecca4818 | ||
|
|
ea779bb57c | ||
|
|
3da6cdbbe5 | ||
|
|
e38163ab83 | ||
|
|
18de31a787 | ||
|
|
c684d995e4 | ||
|
|
d80ceb18d5 | ||
|
|
9be9640c7d | ||
|
|
063c5757af | ||
|
|
d03e67e966 | ||
|
|
fb3c767e25 | ||
|
|
ceb06ac75d | ||
|
|
150b6cc5ea | ||
|
|
b82bab9128 | ||
|
|
6ecf6e1c83 | ||
|
|
c7a112d93b | ||
|
|
20daa6fd06 | ||
|
|
eef61e60eb | ||
|
|
38d5d4d703 | ||
|
|
065cf4a0b6 | ||
|
|
45443a92a1 | ||
|
|
7d177cdb1c | ||
|
|
b189d007e2 | ||
|
|
361211d176 | ||
|
|
792b351cd9 | ||
|
|
66e6085fdd | ||
|
|
9b30203701 | ||
|
|
2ec276e9fb | ||
|
|
25209fab90 | ||
|
|
848ba10030 | ||
|
|
95c7fedd72 | ||
|
|
8a47c461f0 | ||
|
|
1fc4689592 | ||
|
|
f8f9f4fa15 | ||
|
|
a4a8116916 | ||
|
|
03416bb09a | ||
|
|
c78f50e5fd | ||
|
|
bfdfbea328 | ||
|
|
ce6f705881 | ||
|
|
b495b4970d | ||
|
|
5bb4e215a8 | ||
|
|
30584b897a | ||
|
|
b5d6d660e3 | ||
|
|
58c65001e5 | ||
|
|
efed90e084 | ||
|
|
adaa136340 | ||
|
|
51c27460a4 | ||
|
|
10d5590284 | ||
|
|
2db8323301 | ||
|
|
fc14bb7ee8 | ||
|
|
3b31f03fda | ||
|
|
232082451b | ||
|
|
5c8f6fc0f5 | ||
|
|
e783481ed5 | ||
|
|
137c0827cc | ||
|
|
c927c62506 | ||
|
|
fd9ab0e1ba | ||
|
|
5b0ef60756 | ||
|
|
06d3f02e9f | ||
|
|
de56827884 | ||
|
|
b9a43e4830 | ||
|
|
7dbae87776 | ||
|
|
2cabcd9a9c | ||
|
|
e803e21d93 | ||
|
|
46c565cd02 | ||
|
|
ec48c65966 | ||
|
|
fae2421e33 | ||
|
|
888eecbb65 | ||
|
|
f482a5db2f | ||
|
|
cd4a206a48 | ||
|
|
ab8b655d92 | ||
|
|
5e92d7b309 | ||
|
|
5aaea718e0 | ||
|
|
e8d1efd52a | ||
|
|
df7f882552 | ||
|
|
ba161e85a7 | ||
|
|
084e4e7c3a | ||
|
|
3a3987acd3 | ||
|
|
bc77a1703d | ||
|
|
f450141b77 | ||
|
|
13e381bcbe | ||
|
|
06d6338c50 | ||
|
|
28e055031d | ||
|
|
b81430ca3b | ||
|
|
7f334cfcd7 | ||
|
|
3a27b5d6c3 | ||
|
|
20bf0b37d9 | ||
|
|
1a96519f07 | ||
|
|
690bb1c8ce | ||
|
|
d984a48580 | ||
|
|
d6fb5732f4 | ||
|
|
c6925b1280 | ||
|
|
ca3a0fab02 | ||
|
|
9a451fba89 | ||
|
|
ce2b814dd7 | ||
|
|
52506068a2 | ||
|
|
3bcb4469ef | ||
|
|
f78a50e1b3 | ||
|
|
aa7679f1cc | ||
|
|
57c1ab9c8a | ||
|
|
b7b03008f1 | ||
|
|
05bb031e4d | ||
|
|
b62fbdc356 | ||
|
|
6036a94ad0 | ||
|
|
5cf95a98a4 | ||
|
|
a2bf18a766 | ||
|
|
feaee7042d | ||
|
|
dbd6344b4c | ||
|
|
5a6136c7e5 | ||
|
|
aa0c28a510 | ||
|
|
b19ba29eb3 | ||
|
|
444bb1aaf0 | ||
|
|
0894fd9c48 | ||
|
|
6889e5f432 | ||
|
|
881fa448df | ||
|
|
5143fe80dc | ||
|
|
937f3bae5b | ||
|
|
2cde32d6e0 | ||
|
|
17c6fb53d5 | ||
|
|
081ee996cd | ||
|
|
cbe0ce6d20 | ||
|
|
eebb26d38b | ||
|
|
e9db8db8ae | ||
|
|
7a3dab9b62 | ||
|
|
c3d332957a | ||
|
|
7a81b1be3c | ||
|
|
819ce5a870 | ||
|
|
c49d441591 | ||
|
|
521135823a | ||
|
|
f5e8fadecb | ||
|
|
b3cf7e4c12 | ||
|
|
d9f8ee0f7d | ||
|
|
8fbe926091 | ||
|
|
fd42940c4c | ||
|
|
1da3e4bff0 | ||
|
|
12146f1cf7 | ||
|
|
28fc52cbe1 | ||
|
|
077d5f3ad7 | ||
|
|
e0183c6234 | ||
|
|
e0b95d779e | ||
|
|
7100fd916a | ||
|
|
a7607ccae6 | ||
|
|
9e089b6618 | ||
|
|
dd7272e0a9 | ||
|
|
39f3b811fa | ||
|
|
fbe5bade06 | ||
|
|
ad86b15259 | ||
|
|
e97385e508 | ||
|
|
ae7d39960c | ||
|
|
7c2b8ce000 | ||
|
|
71e6aff997 | ||
|
|
af20b978ca | ||
|
|
f39c8b1b4e | ||
|
|
af228dc17b | ||
|
|
7e9d1a4d2b | ||
|
|
dd94f9f8ca | ||
|
|
dacb96a1b0 | ||
|
|
747a48a14a | ||
|
|
e8f487e1f2 | ||
|
|
c3b7236dd3 | ||
|
|
099bfeeaac | ||
|
|
6b444b1d76 | ||
|
|
5b38b148ec | ||
|
|
0e4e20ba38 | ||
|
|
ea3c1d4cca | ||
|
|
40072911b6 | ||
|
|
42feca2d75 | ||
|
|
458c3645a7 | ||
|
|
d91d9c52a4 | ||
|
|
46641b842c | ||
|
|
c19caa25ca | ||
|
|
3b9bcc6315 | ||
|
|
54f60bbb02 | ||
|
|
968794db42 | ||
|
|
6d155cf7a3 | ||
|
|
1c0ad4cd63 | ||
|
|
8b802161c1 | ||
|
|
4db9de46c4 | ||
|
|
6080011029 | ||
|
|
ede20079b8 | ||
|
|
5998a6d415 | ||
|
|
1c52a3d37c | ||
|
|
d0f8c9fdd7 | ||
|
|
e48e0d596d | ||
|
|
b01d486a08 | ||
|
|
0d1914c5fd | ||
|
|
2895121db2 | ||
|
|
6409846a94 | ||
|
|
e8abb4e8ea | ||
|
|
9bb75e38e1 | ||
|
|
76ccacfe66 | ||
|
|
0a64dadebd | ||
|
|
47fcf0d937 | ||
|
|
20d07413d4 | ||
|
|
26ccf1b67c | ||
|
|
5ae6cd2408 | ||
|
|
7debbd990c | ||
|
|
a21b42823f | ||
|
|
dfa44e9c15 | ||
|
|
68a6cd3e1e | ||
|
|
b8b26d120d | ||
|
|
1326722567 | ||
|
|
71170c84cd | ||
|
|
7ac9d4c90b | ||
|
|
a268cf34d5 | ||
|
|
7ffdcb9aa5 | ||
|
|
4ba07bafa3 | ||
|
|
60e107b373 | ||
|
|
ac4e229a0e | ||
|
|
ae71a2144c | ||
|
|
4fd965af21 | ||
|
|
4edc0ce073 | ||
|
|
f88ce6b111 | ||
|
|
8080ef48f4 | ||
|
|
c9b769e826 | ||
|
|
12a558bc3a | ||
|
|
3d25f02629 | ||
|
|
988664a469 | ||
|
|
07799cacf3 | ||
|
|
2360ac75a9 | ||
|
|
9b9d30cf3d | ||
|
|
1671706f99 | ||
|
|
1ba00dc6c6 | ||
|
|
45745fe411 | ||
|
|
066d396a58 | ||
|
|
751bd02345 | ||
|
|
c870e1ae22 | ||
|
|
9ccdec5f20 | ||
|
|
308863e9d0 | ||
|
|
30aeebb544 | ||
|
|
d0514d69bf | ||
|
|
2dfd0d06aa | ||
|
|
cbcc094564 | ||
|
|
e1931c0a9d | ||
|
|
3d37833730 | ||
|
|
3549a6b5ae | ||
|
|
b849ac0994 | ||
|
|
a82f86a04d | ||
|
|
5a21de182d | ||
|
|
d6624c5849 | ||
|
|
ea5dc1ad1c | ||
|
|
7b6e211f33 | ||
|
|
f405b0b92f | ||
|
|
fc224074d2 | ||
|
|
1d9ec8b135 | ||
|
|
ba46b7116e | ||
|
|
54d22b21e5 | ||
|
|
f8d861cbca | ||
|
|
9b2486b055 | ||
|
|
0d20617da5 | ||
|
|
136688a8cc | ||
|
|
6e607d9f43 | ||
|
|
385cb8ee43 | ||
|
|
fe12537dda | ||
|
|
7c33a22be2 | ||
|
|
7e21247f88 | ||
|
|
aa0b22e200 | ||
|
|
61fedb63a8 | ||
|
|
35b9e17afa | ||
|
|
dc7588279a | ||
|
|
c286a25a83 | ||
|
|
7cd8d5d35b | ||
|
|
c70e14f607 | ||
|
|
19b40ec922 | ||
|
|
f549c05032 | ||
|
|
096e7fb801 | ||
|
|
415abf2322 | ||
|
|
d9902fd1a0 | ||
|
|
0d4528741f | ||
|
|
3a9e628e1a | ||
|
|
60051b12c2 | ||
|
|
86ff63fd70 | ||
|
|
dc99da8b72 | ||
|
|
7f44883afd | ||
|
|
65f89574c0 | ||
|
|
883313366b | ||
|
|
31e172e330 | ||
|
|
b50be96b34 | ||
|
|
8635a6b095 | ||
|
|
d02e9b359f | ||
|
|
14592cd423 | ||
|
|
acf1664073 | ||
|
|
5e5961ff8a | ||
|
|
7ff0fca4a0 | ||
|
|
8b18ce8aba | ||
|
|
7f8a95a078 | ||
|
|
21c30135cf | ||
|
|
b8538c500d | ||
|
|
0dd1b3e0fc | ||
|
|
7e415a16b2 | ||
|
|
e7f1a636a1 | ||
|
|
d07655c7a5 | ||
|
|
b2a3049c03 | ||
|
|
6ac1224fdb | ||
|
|
aae9d4ce00 | ||
|
|
340026c5ad | ||
|
|
5e1aeedd5e | ||
|
|
63e87af95b | ||
|
|
041a8a1288 | ||
|
|
920ff4573e | ||
|
|
ca788932e7 | ||
|
|
f10276e962 | ||
|
|
c621d3a638 | ||
|
|
fbeeb7a752 | ||
|
|
fb8d3aaf2b | ||
|
|
4da12ae2f8 | ||
|
|
10da5645a5 | ||
|
|
a9e567b9c4 | ||
|
|
20f767283b | ||
|
|
ec913bc03f | ||
|
|
bd97723788 | ||
|
|
2431c59379 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,5 +1,7 @@
|
||||
#
|
||||
# gitignore for confdroid_puppet
|
||||
.yardoc
|
||||
Gemfile.lock
|
||||
FileList
|
||||
.scannerwork
|
||||
.vscode
|
||||
.puppet-lint.rc
|
||||
|
||||
11
.vscode/settings.json
vendored
11
.vscode/settings.json
vendored
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"cSpell.words": [
|
||||
"appender",
|
||||
"kahadb",
|
||||
"logappender",
|
||||
"requestlogging",
|
||||
"springframework",
|
||||
"Supress",
|
||||
"trapperkeeper"
|
||||
]
|
||||
}
|
||||
100
Jenkinsfile
vendored
100
Jenkinsfile
vendored
@@ -1,100 +0,0 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label 'puppet'
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
deleteDir() /* clean up our workspace */
|
||||
}
|
||||
success {
|
||||
updateGitlabCommitStatus state: 'success'
|
||||
}
|
||||
failure {
|
||||
updateGitlabCommitStatus state: 'failed'
|
||||
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'support@confdroid.com', sendToIndividuals: true])
|
||||
}
|
||||
}
|
||||
|
||||
options {
|
||||
gitLabConnection('gitlab.confdroid.com')
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
stage('pull master') {
|
||||
steps {
|
||||
sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) {
|
||||
sh '''
|
||||
git config user.name "Jenkins Server"
|
||||
git config user.email jenkins@confdroid.com
|
||||
# Ensure we're on the development branch (triggered by push)
|
||||
git checkout development
|
||||
# Create jenkins branch from development
|
||||
git checkout -b jenkins-build-$BUILD_NUMBER
|
||||
# Optionally merge master into jenkins to ensure compatibility
|
||||
git merge origin/master --no-ff || { echo "Merge conflict detected"; exit 1; }
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('puppet parser') {
|
||||
steps {
|
||||
sh '''for file in $(find . -iname \'*.pp\'); do
|
||||
/opt/puppetlabs/bin/puppet parser validate --color false --render-as s --modulepath=modules $file || exit 1;
|
||||
done;'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('check templates') {
|
||||
steps{
|
||||
sh '''for file in $(find . -iname \'*.erb\');
|
||||
do erb -P -x -T "-" $file | ruby -c || exit 1;
|
||||
done;'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('puppet-lint') {
|
||||
steps {
|
||||
sh '''/usr/local/bin/puppet-lint . \\
|
||||
--no-variable_scope-check \\
|
||||
|| { echo "Puppet lint failed"; exit 1; }
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('SonarScan') {
|
||||
steps {
|
||||
withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) {
|
||||
sh '''
|
||||
/opt/sonar-scanner/bin/sonar-scanner \
|
||||
-Dsonar.projectKey=puppet_cd \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.host.url=https://sonarqube.confdroid.com \
|
||||
-Dsonar.token=$SONAR_TOKEN
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('create Puppet documentation') {
|
||||
steps {
|
||||
sh '/opt/puppetlabs/bin/puppet strings'
|
||||
}
|
||||
}
|
||||
|
||||
stage('update repo') {
|
||||
steps {
|
||||
sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) {
|
||||
sh '''
|
||||
git config user.name "Jenkins Server"
|
||||
git config user.email jenkins@confdroid.com
|
||||
git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit"
|
||||
git push origin HEAD:master
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
114
README.md
114
README.md
@@ -1,31 +1,86 @@
|
||||
# Readme
|
||||
|
||||
[](https://jenkins.confdroid.com/job/puppet_cd/)|
|
||||
[](https://jenkins.confdroid.com/job/confdroid_puppet/)
|
||||
[](https://sonarqube.confdroid.com/dashboard?id=confdroid_puppet)
|
||||
[](https://deepwiki.com/grizzlycoda/puppet_collection)
|
||||
|
||||
[[_TOC_]]
|
||||
- [Readme](#readme)
|
||||
- [Synopsis](#synopsis)
|
||||
- [WARNING](#warning)
|
||||
- [Features](#features)
|
||||
- [Puppet server and agent](#puppet-server-and-agent)
|
||||
- [Firewall](#firewall)
|
||||
- [Directories, Files and Services](#directories-files-and-services)
|
||||
- [Optional](#optional)
|
||||
- [R10k service](#r10k-service)
|
||||
- [R10k Web hook](#r10k-web-hook)
|
||||
- [Puppetdb](#puppetdb)
|
||||
- [Support](#support)
|
||||
- [Parameter Inheritance](#parameter-inheritance)
|
||||
- [Module Deployment](#module-deployment)
|
||||
- [native Puppet deployment: via site.pp or nodes.pp](#native-puppet-deployment-via-sitepp-or-nodespp)
|
||||
- [through Foreman](#through-foreman)
|
||||
- [Tests](#tests)
|
||||
- [Contact Us](#contact-us)
|
||||
- [Documentation](#documentation)
|
||||
- [Disclaimer](#disclaimer)
|
||||
|
||||
## Synopsis
|
||||
|
||||
This Puppet module configures settings for Puppet master and agents, PuppetDB and R10k, the full bundle.
|
||||
The syntax etc is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well.
|
||||
This module is also designed to work with External Node Classifiers (ENC), for instance Foreman.
|
||||
This Puppet module configures settings a full Puppet environment, i.e. Puppet master, Puppet agents pointed to the master.
|
||||
|
||||
Optionally:
|
||||
|
||||
- R10k to connect to a control repo and manage
|
||||
puppet modules
|
||||
- webhook listener to trigger r10k when a puppet module has been updated.
|
||||
- PuppetDB for exporting and storing resources.
|
||||
|
||||
The syntax is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well.
|
||||
This module is also designed to work with [Foreman][def] as External Node Classifier (ENC), although it does not install Foreman.
|
||||
|
||||
## WARNING
|
||||
|
||||
***Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production***
|
||||
> **Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production**
|
||||
|
||||
## Features
|
||||
|
||||
* install packages depending on whether the host fqdn equals either master fqdn, db fqdn or none (agent).
|
||||
* open firewall ports depending on fqdn choices
|
||||
* start services as required
|
||||
* manage directories
|
||||
* manage user settings (optional)
|
||||
### Puppet server and agent
|
||||
|
||||
- if the host FQDN matches your specified Puppet master via `$pt_pm_fqdn`, it installs and configures a puppetmaster ready for serving with Foreman as ENC (Foreman not yet included). It specifically rewrites the puppet.conf with values taken from parameters.
|
||||
- Any other system becomes a puppet agent.
|
||||
|
||||
### Firewall
|
||||
|
||||
- open firewall ports depending on choices above
|
||||
|
||||
### Directories, Files and Services
|
||||
|
||||
- manage directories and required files including
|
||||
permissions and selinux context (todo)
|
||||
- start services as required
|
||||
|
||||
### Optional
|
||||
|
||||
#### R10k service
|
||||
|
||||
- install r10k service on your puppetmaster.
|
||||
If you set `$pt_use_r10k`to `true`, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile.
|
||||
|
||||
#### R10k Web hook
|
||||
|
||||
- installs a webhook listener
|
||||
If you set `$pt_use_r10k_webhook`to `true`, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.
|
||||
|
||||
#### Puppetdb
|
||||
|
||||
- installs and configures Puppetdb on the node specified with `pt_puppetdb_fqdn`, which can be the puppetmaster or any other node (recommended for performance reasons)
|
||||
- the logrotation can be set in max days via `pt_pptdb_log_max_age`
|
||||
|
||||
## Support
|
||||
|
||||
* Rocky 9
|
||||
* Puppet Core 8
|
||||
- Rocky 9
|
||||
- Puppet Core 8
|
||||
|
||||
## Parameter Inheritance
|
||||
|
||||
@@ -33,20 +88,37 @@ All parameters are listed in `params.pp` and inherited from there. Variable par
|
||||
|
||||
## Module Deployment
|
||||
|
||||
ALmost every puppet setup is done in very custom ways, and hence the way the modules are deployed to nodes are different. This module assumes [Foreman][def] as ENC, so the modules just have to be present on the master node and Foreman will take care for it.
|
||||
### native Puppet deployment: via site.pp or nodes.pp
|
||||
|
||||
```ruby
|
||||
include confdroid_puppet
|
||||
|
||||
```
|
||||
|
||||
### through Foreman
|
||||
|
||||
- ensure the module is present on the puppetmaster running Foreman in the module path, i.e. /etc/puppetlabs/code/environments/production/ . use r10k or clone the module there through git
|
||||
- import the module in Foreman
|
||||
- assign `confdroid_puppet::params` to the nodes in question, typically a host group.
|
||||
- overwrite the value for `$pt_pm_fqdn`to match your puppetmaster's fqdn. **This will overwrite the puppet.conf with the settings set in params.pp. It is highly recommended to use a test system first to see and fine tune those settings!** Any node not matching this fqdn will become an agent.
|
||||
|
||||
## Tests
|
||||
|
||||
* Puppet Lint
|
||||
* excluded tests:
|
||||
* `--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.
|
||||
* Puppet Parser
|
||||
* ERB Template Parser
|
||||
* Sonar Quality Gate
|
||||
- Puppet Lint
|
||||
- excluded tests:
|
||||
- `--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.
|
||||
- Puppet Parser
|
||||
- ERB Template Parser
|
||||
- Sonar Quality Gate
|
||||
|
||||
## Contact Us
|
||||
|
||||
[contact Us](https://confdroid.com/contact/)
|
||||
- [contact form](https://confdroid.com/contact/)
|
||||
- [feedback portal](https://feedback.confdroid.com/)
|
||||
|
||||
## Documentation
|
||||
|
||||
Additional documentation like FAQ can be found in the [**member wiki**](https://3for.me/x1mar).
|
||||
|
||||
## Disclaimer
|
||||
|
||||
|
||||
163
doc/_index.html
Normal file
163
doc/_index.html
Normal file
@@ -0,0 +1,163 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = null;
|
||||
relpath = '';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.36</h1>
|
||||
<div id="listing">
|
||||
<h1 class="alphaindex">Alphabetic Index</h1>
|
||||
|
||||
<h2>Puppet Class Listing A-Z</h2>
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td valign='top' width="33%">
|
||||
|
||||
|
||||
<ul id="alpha_C" class="alpha">
|
||||
<li class="letter">C</li>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet.html" title="puppet_classes::confdroid_puppet (puppet_class)">confdroid_puppet</a></span>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::confdroid_puppet::firewall::iptables (puppet_class)">confdroid_puppet::firewall::iptables</a></span>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::confdroid_puppet::main::config (puppet_class)">confdroid_puppet::main::config</a></span>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Amain_3A_3Adirs.html" title="puppet_classes::confdroid_puppet::main::dirs (puppet_class)">confdroid_puppet::main::dirs</a></span>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Amain_3A_3Afiles.html" title="puppet_classes::confdroid_puppet::main::files (puppet_class)">confdroid_puppet::main::files</a></span>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::confdroid_puppet::main::install (puppet_class)">confdroid_puppet::main::install</a></span>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Apuppetdb_3A_3Adirs.html" title="puppet_classes::confdroid_puppet::puppetdb::dirs (puppet_class)">confdroid_puppet::puppetdb::dirs</a></span>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Apuppetdb_3A_3Afiles.html" title="puppet_classes::confdroid_puppet::puppetdb::files (puppet_class)">confdroid_puppet::puppetdb::files</a></span>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Ar10k_3A_3Ainstall.html" title="puppet_classes::confdroid_puppet::r10k::install (puppet_class)">confdroid_puppet::r10k::install</a></span>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_puppet::server::service (puppet_class)">confdroid_puppet::server::service</a></span>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>File Listing</h2>
|
||||
<ul id="files" class="index_inline_list">
|
||||
|
||||
|
||||
<li class="r1"><a href="index.html" title="README">README</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
8
doc/css/common.css
Normal file
8
doc/css/common.css
Normal file
@@ -0,0 +1,8 @@
|
||||
/* Ensure the search bar doesn't overlap with links */
|
||||
.fixed_header {
|
||||
padding-bottom: 25px;
|
||||
}
|
||||
|
||||
#full_list {
|
||||
padding-top: 15px;
|
||||
}
|
||||
58
doc/css/full_list.css
Normal file
58
doc/css/full_list.css
Normal file
@@ -0,0 +1,58 @@
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
height: 101%;
|
||||
overflow-x: hidden;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; }
|
||||
.clear { clear: both; }
|
||||
.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; }
|
||||
#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; }
|
||||
#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; }
|
||||
#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; }
|
||||
#full_list ul { padding: 0; }
|
||||
#full_list li { padding: 0; margin: 0; list-style: none; }
|
||||
#full_list li .item { padding: 5px 5px 5px 12px; }
|
||||
#noresults { padding: 7px 12px; background: #fff; }
|
||||
#content.insearch #noresults { margin-left: 7px; }
|
||||
li.collapsed ul { display: none; }
|
||||
li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; }
|
||||
li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; }
|
||||
li { color: #888; cursor: pointer; }
|
||||
li.deprecated { text-decoration: line-through; font-style: italic; }
|
||||
li.odd { background: #f0f0f0; }
|
||||
li.even { background: #fafafa; }
|
||||
.item:hover { background: #ddd; }
|
||||
li small:before { content: "("; }
|
||||
li small:after { content: ")"; }
|
||||
li small.search_info { display: none; }
|
||||
a, a:visited { text-decoration: none; color: #05a; }
|
||||
li.clicked > .item { background: #05a; color: #ccc; }
|
||||
li.clicked > .item a, li.clicked > .item a:visited { color: #eee; }
|
||||
li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; }
|
||||
li.collapsed.clicked a.toggle { background-position: top right; }
|
||||
#search input { border: 1px solid #bbb; border-radius: 3px; }
|
||||
#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; }
|
||||
#full_list_nav a, #nav a:visited { color: #358; }
|
||||
#full_list_nav a:hover { background: transparent; color: #5af; }
|
||||
#full_list_nav span:after { content: ' | '; }
|
||||
#full_list_nav span:last-child:after { content: ''; }
|
||||
|
||||
#content h1 { margin-top: 0; }
|
||||
li { white-space: nowrap; cursor: normal; }
|
||||
li small { display: block; font-size: 0.8em; }
|
||||
li small:before { content: ""; }
|
||||
li small:after { content: ""; }
|
||||
li small.search_info { display: none; }
|
||||
#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; }
|
||||
#content.insearch #search { background-position: center right; }
|
||||
#search input { width: 110px; }
|
||||
|
||||
#full_list.insearch ul { display: block; }
|
||||
#full_list.insearch .item { display: none; }
|
||||
#full_list.insearch .found { display: block; padding-left: 11px !important; }
|
||||
#full_list.insearch li a.toggle { display: none; }
|
||||
#full_list.insearch li small.search_info { display: block; }
|
||||
497
doc/css/style.css
Normal file
497
doc/css/style.css
Normal file
@@ -0,0 +1,497 @@
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
}
|
||||
|
||||
#nav {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
border-right: 1px dotted #eee;
|
||||
overflow: auto;
|
||||
}
|
||||
.nav_wrap {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 20%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
flex-shrink: 0;
|
||||
-webkit-flex-shrink: 0;
|
||||
-ms-flex: 1 0;
|
||||
}
|
||||
#resizer {
|
||||
position: absolute;
|
||||
right: -5px;
|
||||
top: 0;
|
||||
width: 10px;
|
||||
height: 100%;
|
||||
cursor: col-resize;
|
||||
z-index: 9999;
|
||||
}
|
||||
#main {
|
||||
flex: 5 1;
|
||||
-webkit-flex: 5 1;
|
||||
-ms-flex: 5 1;
|
||||
outline: none;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
padding: 1.2em;
|
||||
padding-top: 0.2em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (max-width: 920px) {
|
||||
.nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; }
|
||||
#resizer { display: none; }
|
||||
#nav {
|
||||
z-index: 9999;
|
||||
background: #fff;
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
right: 12px;
|
||||
width: 500px;
|
||||
max-width: 80%;
|
||||
height: 80%;
|
||||
overflow-y: scroll;
|
||||
border: 1px solid #999;
|
||||
border-collapse: collapse;
|
||||
box-shadow: -7px 5px 25px #aaa;
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 920px) {
|
||||
body { height: 100%; overflow: hidden; }
|
||||
#main { height: 100%; overflow: auto; }
|
||||
#search { display: none; }
|
||||
}
|
||||
|
||||
#main img { max-width: 100%; }
|
||||
h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; }
|
||||
h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; }
|
||||
h1.title { margin-bottom: 10px; }
|
||||
h1.alphaindex { margin-top: 0; font-size: 22px; }
|
||||
h2 {
|
||||
padding: 0;
|
||||
padding-bottom: 3px;
|
||||
border-bottom: 1px #aaa solid;
|
||||
font-size: 1.4em;
|
||||
margin: 1.8em 0 0.5em;
|
||||
position: relative;
|
||||
}
|
||||
h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; }
|
||||
h2 small a {
|
||||
display: block;
|
||||
height: 20px;
|
||||
border: 1px solid #aaa;
|
||||
border-bottom: 0;
|
||||
border-top-left-radius: 5px;
|
||||
background: #f8f8f8;
|
||||
position: relative;
|
||||
padding: 2px 7px;
|
||||
}
|
||||
.clear { clear: both; }
|
||||
.inline { display: inline; }
|
||||
.inline p:first-child { display: inline; }
|
||||
.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; }
|
||||
.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt {
|
||||
color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; }
|
||||
.docstring h1 { font-size: 1.2em; }
|
||||
.docstring h2 { font-size: 1.1em; }
|
||||
.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; }
|
||||
.summary_desc .object_link a, .docstring .object_link a {
|
||||
font-family: monospace; font-size: 1.05em;
|
||||
color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.rdoc-term { padding-right: 25px; font-weight: bold; }
|
||||
.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; }
|
||||
.summary_desc pre.code .object_link a, .docstring pre.code .object_link a {
|
||||
padding: 0px; background: inherit; color: inherit; border-radius: inherit;
|
||||
}
|
||||
|
||||
/* style for <table> */
|
||||
#filecontents table, .docstring table { border-collapse: collapse; }
|
||||
#filecontents table th, #filecontents table td,
|
||||
.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; }
|
||||
#filecontents table tr:nth-child(odd),
|
||||
.docstring table tr:nth-child(odd) { background: #eee; }
|
||||
#filecontents table tr:nth-child(even),
|
||||
.docstring table tr:nth-child(even) { background: #fff; }
|
||||
#filecontents table th, .docstring table th { background: #fff; }
|
||||
|
||||
/* style for <ul> */
|
||||
#filecontents li > p, .docstring li > p { margin: 0px; }
|
||||
#filecontents ul, .docstring ul { padding-left: 20px; }
|
||||
/* style for <dl> */
|
||||
#filecontents dl, .docstring dl { border: 1px solid #ccc; }
|
||||
#filecontents dt, .docstring dt { background: #ddd; font-weight: bold; padding: 3px 5px; }
|
||||
#filecontents dd, .docstring dd { padding: 5px 0px; margin-left: 18px; }
|
||||
#filecontents dd > p, .docstring dd > p { margin: 0px; }
|
||||
|
||||
.note {
|
||||
color: #222;
|
||||
margin: 20px 0;
|
||||
padding: 10px;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 3px;
|
||||
display: block;
|
||||
}
|
||||
.docstring .note {
|
||||
border-left-color: #ccc;
|
||||
border-left-width: 5px;
|
||||
}
|
||||
.note.todo { background: #ffffc5; border-color: #ececaa; }
|
||||
.note.returns_void { background: #efefef; }
|
||||
.note.deprecated { background: #ffe5e5; border-color: #e9dada; }
|
||||
.note.title.deprecated { background: #ffe5e5; border-color: #e9dada; }
|
||||
.note.private { background: #ffffc5; border-color: #ececaa; }
|
||||
.note.title { padding: 3px 6px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; }
|
||||
.summary_signature + .note.title { margin-left: 7px; }
|
||||
h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; }
|
||||
.note.title { background: #efefef; }
|
||||
.note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; }
|
||||
.note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; }
|
||||
.note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; }
|
||||
.note.title.private { background: #d5d5d5; border-color: #c5c5c5; }
|
||||
.note.title.not_defined_here { background: transparent; border: none; font-style: italic; }
|
||||
.discussion .note { margin-top: 6px; }
|
||||
.discussion .note:first-child { margin-top: 0; }
|
||||
|
||||
h3.inherited {
|
||||
font-style: italic;
|
||||
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
|
||||
font-weight: normal;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 3px;
|
||||
font-size: 13px;
|
||||
}
|
||||
p.inherited {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
.box_info dl {
|
||||
margin: 0;
|
||||
border: 0;
|
||||
width: 100%;
|
||||
font-size: 1em;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
}
|
||||
.box_info dl dt {
|
||||
flex-shrink: 0;
|
||||
-webkit-flex-shrink: 1;
|
||||
-ms-flex-shrink: 1;
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
border: 1px solid #aaa;
|
||||
border-width: 1px 0px 0px 1px;
|
||||
padding: 6px 0;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.box_info dl dd {
|
||||
flex-grow: 1;
|
||||
-webkit-flex-grow: 1;
|
||||
-ms-flex: 1;
|
||||
max-width: 420px;
|
||||
padding: 6px 0;
|
||||
padding-right: 20px;
|
||||
border: 1px solid #aaa;
|
||||
border-width: 1px 1px 0 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.box_info dl:last-child > * {
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
.box_info dl:nth-child(odd) > * { background: #eee; }
|
||||
.box_info dl:nth-child(even) > * { background: #fff; }
|
||||
.box_info dl > * { margin: 0; }
|
||||
|
||||
ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; }
|
||||
.index_inline_list { padding-left: 0; font-size: 1.1em; }
|
||||
|
||||
.index_inline_list li {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
padding: 0 12px;
|
||||
line-height: 30px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
dl.constants { margin-left: 10px; }
|
||||
dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; }
|
||||
dl.constants.compact dt { display: inline-block; font-weight: normal }
|
||||
dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; }
|
||||
dl.constants .docstring .note:first-child { margin-top: 5px; }
|
||||
|
||||
.summary_desc {
|
||||
margin-left: 32px;
|
||||
display: block;
|
||||
font-family: sans-serif;
|
||||
font-size: 1.1em;
|
||||
margin-top: 8px;
|
||||
line-height: 1.5145em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
.summary_desc tt { font-size: 0.9em; }
|
||||
dl.constants .note { padding: 2px 6px; padding-right: 12px; margin-top: 6px; }
|
||||
dl.constants .docstring { margin-left: 32px; font-size: 0.9em; font-weight: normal; }
|
||||
dl.constants .tags { padding-left: 32px; font-size: 0.9em; line-height: 0.8em; }
|
||||
dl.constants .discussion *:first-child { margin-top: 0; }
|
||||
dl.constants .discussion *:last-child { margin-bottom: 0; }
|
||||
|
||||
.method_details { border-top: 1px dotted #ccc; margin-top: 25px; padding-top: 0; }
|
||||
.method_details.first { border: 0; margin-top: 5px; }
|
||||
.method_details.first h3.signature { margin-top: 1em; }
|
||||
p.signature, h3.signature {
|
||||
font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace;
|
||||
padding: 6px 10px; margin-top: 1em;
|
||||
background: #E8F4FF; border: 1px solid #d8d8e5; border-radius: 5px;
|
||||
}
|
||||
p.signature tt,
|
||||
h3.signature tt { font-family: Monaco, Consolas, Courier, monospace; }
|
||||
p.signature .overload,
|
||||
h3.signature .overload { display: block; }
|
||||
p.signature .extras,
|
||||
h3.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; }
|
||||
p.signature .not_defined_here,
|
||||
h3.signature .not_defined_here,
|
||||
p.signature .aliases,
|
||||
h3.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; }
|
||||
p.signature .aliases .names,
|
||||
h3.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; }
|
||||
|
||||
.tags .tag_title { font-size: 1.05em; margin-bottom: 0; font-weight: bold; }
|
||||
.tags .tag_title tt { color: initial; padding: initial; background: initial; }
|
||||
.tags ul { margin-top: 5px; padding-left: 30px; list-style: square; }
|
||||
.tags ul li { margin-bottom: 3px; }
|
||||
.tags ul .name { font-family: monospace; font-weight: bold; }
|
||||
.tags ul .note { padding: 3px 6px; }
|
||||
.tags { margin-bottom: 12px; }
|
||||
|
||||
.tags .examples .tag_title { margin-bottom: 10px; font-weight: bold; }
|
||||
.tags .examples .inline p { padding: 0; margin: 0; font-weight: bold; font-size: 1em; }
|
||||
.tags .examples .inline p:before { content: "▸"; font-size: 1em; margin-right: 5px; }
|
||||
|
||||
.tags .overload .overload_item { list-style: none; margin-bottom: 25px; }
|
||||
.tags .overload .overload_item .signature {
|
||||
padding: 2px 8px;
|
||||
background: #F1F8FF; border: 1px solid #d8d8e5; border-radius: 3px;
|
||||
}
|
||||
.tags .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; }
|
||||
.tags .overload .docstring { margin-top: 15px; }
|
||||
|
||||
.defines { display: none; }
|
||||
|
||||
#method_missing_details .notice.this { position: relative; top: -8px; color: #888; padding: 0; margin: 0; }
|
||||
|
||||
.showSource { font-size: 0.9em; }
|
||||
.showSource a, .showSource a:visited { text-decoration: none; color: #666; }
|
||||
|
||||
#content a, #content a:visited { text-decoration: none; color: #05a; }
|
||||
#content a:hover { background: #ffffa5; }
|
||||
|
||||
ul.summary {
|
||||
list-style: none;
|
||||
font-family: monospace;
|
||||
font-size: 1em;
|
||||
line-height: 1.5em;
|
||||
padding-left: 0px;
|
||||
}
|
||||
ul.summary a, ul.summary a:visited {
|
||||
text-decoration: none; font-size: 1.1em;
|
||||
}
|
||||
ul.summary li { margin-bottom: 5px; }
|
||||
.summary_signature { padding: 4px 8px; background: #f8f8f8; border: 1px solid #f0f0f0; border-radius: 5px; }
|
||||
.summary_signature:hover { background: #CFEBFF; border-color: #A4CCDA; cursor: pointer; }
|
||||
.summary_signature.deprecated { background: #ffe5e5; border-color: #e9dada; }
|
||||
ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;}
|
||||
ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; }
|
||||
#content .summary_signature:hover a,
|
||||
#content .summary_signature:hover a:visited {
|
||||
background: transparent;
|
||||
color: #049;
|
||||
}
|
||||
|
||||
p.inherited a { font-family: monospace; font-size: 0.9em; }
|
||||
p.inherited { word-spacing: 5px; font-size: 1.2em; }
|
||||
|
||||
p.children { font-size: 1.2em; }
|
||||
p.children a { font-size: 0.9em; }
|
||||
p.children strong { font-size: 0.8em; }
|
||||
p.children strong.modules { padding-left: 5px; }
|
||||
|
||||
ul.fullTree { display: none; padding-left: 0; list-style: none; margin-left: 0; margin-bottom: 10px; }
|
||||
ul.fullTree ul { margin-left: 0; padding-left: 0; list-style: none; }
|
||||
ul.fullTree li { text-align: center; padding-top: 18px; padding-bottom: 12px; background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHtJREFUeNqMzrEJAkEURdGzuhgZbSoYWcAWoBVsB4JgZAGmphsZCZYzTQgWNCYrDN9RvMmHx+X916SUBFbo8CzD1idXrLErw1mQttgXtyrOcQ/Ny5p4Qh+2XqLYYazsPWNTiuMkRxa4vcV+evuNAUOLIx5+c2hyzv7hNQC67Q+/HHmlEwAAAABJRU5ErkJggg==) no-repeat top center; }
|
||||
ul.fullTree li:first-child { padding-top: 0; background: transparent; }
|
||||
ul.fullTree li:last-child { padding-bottom: 0; }
|
||||
.showAll ul.fullTree { display: block; }
|
||||
.showAll .inheritName { display: none; }
|
||||
|
||||
#search { position: absolute; right: 12px; top: 0px; z-index: 9000; }
|
||||
#search a {
|
||||
display: block; float: left;
|
||||
padding: 4px 8px; text-decoration: none; color: #05a; fill: #05a;
|
||||
border: 1px solid #d8d8e5;
|
||||
border-bottom-left-radius: 3px; border-bottom-right-radius: 3px;
|
||||
background: #F1F8FF;
|
||||
box-shadow: -1px 1px 3px #ddd;
|
||||
}
|
||||
#search a:hover { background: #f5faff; color: #06b; fill: #06b; }
|
||||
#search a.active {
|
||||
background: #568; padding-bottom: 20px; color: #fff; fill: #fff;
|
||||
border: 1px solid #457;
|
||||
border-top-left-radius: 5px; border-top-right-radius: 5px;
|
||||
}
|
||||
#search a.inactive { color: #999; fill: #999; }
|
||||
.inheritanceTree, .toggleDefines {
|
||||
float: right;
|
||||
border-left: 1px solid #aaa;
|
||||
position: absolute; top: 0; right: 0;
|
||||
height: 100%;
|
||||
background: #f6f6f6;
|
||||
padding: 5px;
|
||||
min-width: 55px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#menu { font-size: 1.3em; color: #bbb; }
|
||||
#menu .title, #menu a { font-size: 0.7em; }
|
||||
#menu .title a { font-size: 1em; }
|
||||
#menu .title { color: #555; }
|
||||
#menu a, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; }
|
||||
#menu a:hover { color: #05a; }
|
||||
|
||||
#footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; }
|
||||
#footer a, #footer a:visited { color: #444; text-decoration: none; border-bottom: 1px dotted #bbd; }
|
||||
#footer a:hover { color: #05a; }
|
||||
|
||||
#listing ul.alpha { font-size: 1.1em; }
|
||||
#listing ul.alpha { margin: 0; padding: 0; padding-bottom: 10px; list-style: none; }
|
||||
#listing ul.alpha li.letter { font-size: 1.4em; padding-bottom: 10px; }
|
||||
#listing ul.alpha ul { margin: 0; padding-left: 15px; }
|
||||
#listing ul small { color: #666; font-size: 0.7em; }
|
||||
|
||||
li.r1 { background: #f0f0f0; }
|
||||
li.r2 { background: #fafafa; }
|
||||
|
||||
#content ul.summary li.deprecated .summary_signature a,
|
||||
#content ul.summary li.deprecated .summary_signature a:visited { text-decoration: line-through; font-style: italic; }
|
||||
|
||||
#toc {
|
||||
position: relative;
|
||||
float: right;
|
||||
overflow-x: auto;
|
||||
right: -3px;
|
||||
margin-left: 20px;
|
||||
margin-bottom: 20px;
|
||||
padding: 20px; padding-right: 30px;
|
||||
max-width: 300px;
|
||||
z-index: 5000;
|
||||
background: #fefefe;
|
||||
border: 1px solid #ddd;
|
||||
box-shadow: -2px 2px 6px #bbb;
|
||||
}
|
||||
#toc .title { margin: 0; }
|
||||
#toc ol { padding-left: 1.8em; }
|
||||
#toc li { font-size: 1.1em; line-height: 1.7em; }
|
||||
#toc > ol > li { font-size: 1.1em; font-weight: bold; }
|
||||
#toc ol > li > ol { font-size: 0.9em; }
|
||||
#toc ol ol > li > ol { padding-left: 2.3em; }
|
||||
#toc ol + li { margin-top: 0.3em; }
|
||||
#toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; }
|
||||
#toc.hidden:hover { background: #fafafa; }
|
||||
#filecontents h1 + #toc.nofloat { margin-top: 0; }
|
||||
@media (max-width: 560px) {
|
||||
#toc {
|
||||
margin-left: 0;
|
||||
margin-top: 16px;
|
||||
float: none;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* syntax highlighting */
|
||||
.source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; }
|
||||
#filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; }
|
||||
#filecontents pre.code, .docstring pre.code { display: block; }
|
||||
.source_code .lines { padding-right: 12px; color: #555; text-align: right; }
|
||||
#filecontents pre.code, .docstring pre.code,
|
||||
.tags pre.example {
|
||||
padding: 9px 14px;
|
||||
margin-top: 4px;
|
||||
border: 1px solid #e1e1e8;
|
||||
background: #f7f7f9;
|
||||
border-radius: 4px;
|
||||
font-size: 1em;
|
||||
overflow-x: auto;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
pre.code { color: #000; tab-size: 2; }
|
||||
pre.code .info.file { color: #555; }
|
||||
pre.code .val { color: #036A07; }
|
||||
pre.code .tstring_content,
|
||||
pre.code .heredoc_beg, pre.code .heredoc_end,
|
||||
pre.code .qwords_beg, pre.code .qwords_end, pre.code .qwords_sep,
|
||||
pre.code .words_beg, pre.code .words_end, pre.code .words_sep,
|
||||
pre.code .qsymbols_beg, pre.code .qsymbols_end, pre.code .qsymbols_sep,
|
||||
pre.code .symbols_beg, pre.code .symbols_end, pre.code .symbols_sep,
|
||||
pre.code .tstring, pre.code .dstring { color: #036A07; }
|
||||
pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s,
|
||||
pre.code .rubyid_to_sym, pre.code .rubyid_to_f,
|
||||
pre.code .dot + pre.code .id,
|
||||
pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; }
|
||||
pre.code .comment { color: #0066FF; }
|
||||
pre.code .const, pre.code .constant { color: #585CF6; }
|
||||
pre.code .label,
|
||||
pre.code .symbol { color: #C5060B; }
|
||||
pre.code .kw,
|
||||
pre.code .rubyid_require,
|
||||
pre.code .rubyid_extend,
|
||||
pre.code .rubyid_include { color: #0000FF; }
|
||||
pre.code .ivar { color: #318495; }
|
||||
pre.code .gvar,
|
||||
pre.code .rubyid_backref,
|
||||
pre.code .rubyid_nth_ref { color: #6D79DE; }
|
||||
pre.code .regexp, .dregexp { color: #036A07; }
|
||||
pre.code a { border-bottom: 1px dotted #bbf; }
|
||||
/* inline code */
|
||||
*:not(pre) > code {
|
||||
padding: 1px 3px 1px 3px;
|
||||
border: 1px solid #E1E1E8;
|
||||
background: #F7F7F9;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Color fix for links */
|
||||
#content .summary_desc pre.code .id > .object_link a, /* identifier */
|
||||
#content .docstring pre.code .id > .object_link a { color: #0085FF; }
|
||||
#content .summary_desc pre.code .const > .object_link a, /* constant */
|
||||
#content .docstring pre.code .const > .object_link a { color: #585CF6; }
|
||||
236
doc/file.README.html
Normal file
236
doc/file.README.html
Normal file
@@ -0,0 +1,236 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
File: README
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "";
|
||||
relpath = '';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="file_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="_index.html">Index</a> »
|
||||
<span class="title">File: README</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><div id='filecontents'>
|
||||
<h1 id="label-Readme">Readme</h1>
|
||||
|
||||
<p><a href="https://jenkins.confdroid.com/job/confdroid_puppet/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_puppet"></a> <a href="https://sonarqube.confdroid.com/dashboard?id=confdroid_puppet"><img src="https://sonarqube.confdroid.com/api/project_badges/measure?project=confdroid_puppet&metric=security_hotspots&token=sqb_97a025b42213e7290a4f6e3d459957ee96c49db8"></a> <a href="https://deepwiki.com/grizzlycoda/puppet_collection"><img src="https://deepwiki.com/badge.svg"></a></p>
|
||||
<ul><li>
|
||||
<p><a href="#readme">Readme</a></p>
|
||||
</li><li>
|
||||
<p><a href="#synopsis">Synopsis</a></p>
|
||||
</li><li>
|
||||
<p><a href="#warning">WARNING</a></p>
|
||||
</li><li>
|
||||
<p><a href="#features">Features</a></p>
|
||||
<ul><li>
|
||||
<p><a href="#puppet-server-and-agent">Puppet server and agent</a></p>
|
||||
</li><li>
|
||||
<p><a href="#firewall">Firewall</a></p>
|
||||
</li><li>
|
||||
<p><a href="#directories-files-and-services">Directories, Files and Services</a></p>
|
||||
</li><li>
|
||||
<p><a href="#optional">Optional</a></p>
|
||||
</li><li>
|
||||
<p><a href="#r10k-service">R10k service</a></p>
|
||||
</li><li>
|
||||
<p><a href="#r10k-web-hook">R10k Web hook</a></p>
|
||||
</li><li>
|
||||
<p><a href="#puppetdb">Puppetdb</a></p>
|
||||
</li></ul>
|
||||
</li><li>
|
||||
<p><a href="#support">Support</a></p>
|
||||
</li><li>
|
||||
<p><a href="#parameter-inheritance">Parameter Inheritance</a></p>
|
||||
</li><li>
|
||||
<p><a href="#module-deployment">Module Deployment</a></p>
|
||||
<ul><li>
|
||||
<p><a href="#native-puppet-deployment-via-sitepp-or-nodespp">native Puppet deployment: via site.pp or nodes.pp</a></p>
|
||||
</li><li>
|
||||
<p><a href="#through-foreman">through Foreman</a></p>
|
||||
</li></ul>
|
||||
</li><li>
|
||||
<p><a href="#tests">Tests</a></p>
|
||||
</li><li>
|
||||
<p><a href="#contact-us">Contact Us</a></p>
|
||||
</li><li>
|
||||
<p><a href="#documentation">Documentation</a></p>
|
||||
</li><li>
|
||||
<p><a href="#disclaimer">Disclaimer</a></p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Synopsis">Synopsis</h2>
|
||||
|
||||
<p>This Puppet module configures settings a full Puppet environment, i.e. Puppet master, Puppet agents pointed to the master.</p>
|
||||
|
||||
<p>Optionally:</p>
|
||||
<ul><li>
|
||||
<p>R10k to connect to a control repo and manage puppet modules</p>
|
||||
</li><li>
|
||||
<p>webhook listener to trigger r10k when a puppet module has been updated.</p>
|
||||
</li><li>
|
||||
<p>PuppetDB for exporting and storing resources.</p>
|
||||
</li></ul>
|
||||
|
||||
<p>The syntax is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. This module is also designed to work with <a href="https://www.theforeman.org/manuals/3.13/quickstart_guide.html">Foreman</a> as External Node Classifier (ENC), although it does not install Foreman.</p>
|
||||
|
||||
<h2 id="label-WARNING">WARNING</h2>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<h2 id="label-Features">Features</h2>
|
||||
|
||||
<h3 id="label-Puppet+server+and+agent">Puppet server and agent</h3>
|
||||
<ul><li>
|
||||
<p>if the host FQDN matches your specified Puppet master via <code>$pt_pm_fqdn</code>, it installs and configures a puppetmaster ready for serving with Foreman as ENC (Foreman not yet included). It specifically rewrites the puppet.conf with values taken from parameters.</p>
|
||||
</li><li>
|
||||
<p>Any other system becomes a puppet agent.</p>
|
||||
</li></ul>
|
||||
|
||||
<h3 id="label-Firewall">Firewall</h3>
|
||||
<ul><li>
|
||||
<p>open firewall ports depending on choices above</p>
|
||||
</li></ul>
|
||||
|
||||
<h3 id="label-Directories-2C+Files+and+Services">Directories, Files and Services</h3>
|
||||
<ul><li>
|
||||
<p>manage directories and required files including permissions and selinux context (todo)</p>
|
||||
</li><li>
|
||||
<p>start services as required</p>
|
||||
</li></ul>
|
||||
|
||||
<h3 id="label-Optional">Optional</h3>
|
||||
|
||||
<h4 id="label-R10k+service">R10k service</h4>
|
||||
<ul><li>
|
||||
<p>install r10k service on your puppetmaster. If you set <code>$pt_use_r10k</code>to <code>true</code>, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile.</p>
|
||||
</li></ul>
|
||||
|
||||
<h4 id="label-R10k+Web+hook">R10k Web hook</h4>
|
||||
<ul><li>
|
||||
<p>installs a webhook listener If you set <code>$pt_use_r10k_webhook</code>to <code>true</code>, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.</p>
|
||||
</li></ul>
|
||||
|
||||
<h4 id="label-Puppetdb">Puppetdb</h4>
|
||||
<ul><li>
|
||||
<p>installs and configures Puppetdb on the node specified with <code>pt_puppetdb_fqdn</code>, which can be the puppetmaster or any other node (recommended for performance reasons)</p>
|
||||
</li><li>
|
||||
<p>the logrotation can be set in max days via <code>pt_pptdb_log_max_age</code></p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Support">Support</h2>
|
||||
<ul><li>
|
||||
<p>Rocky 9</p>
|
||||
</li><li>
|
||||
<p>Puppet Core 8</p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Parameter+Inheritance">Parameter Inheritance</h2>
|
||||
|
||||
<p>All parameters are listed in <code>params.pp</code> and inherited from there. Variable parameters are in the upper section and also documented in the top. These can be overridden by the ENC. Parameters in the bottom section (curly brackets) cannot be overridden and usually are used for keeping the code in the classes more readable.</p>
|
||||
|
||||
<h2 id="label-Module+Deployment">Module Deployment</h2>
|
||||
|
||||
<h3 id="label-native+Puppet+deployment-3A+via+site.pp+or+nodes.pp">native Puppet deployment: via site.pp or nodes.pp</h3>
|
||||
|
||||
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_include'>include</span> <span class='id identifier rubyid_confdroid_puppet'>confdroid_puppet</span>
|
||||
</code></pre>
|
||||
|
||||
<h3 id="label-through+Foreman">through Foreman</h3>
|
||||
<ul><li>
|
||||
<p>ensure the module is present on the puppetmaster running Foreman in the module path, i.e. /etc/puppetlabs/code/environments/production/ . use r10k or clone the module there through git</p>
|
||||
</li><li>
|
||||
<p>import the module in Foreman</p>
|
||||
</li><li>
|
||||
<p>assign <code>confdroid_puppet::params</code> to the nodes in question, typically a host group.</p>
|
||||
</li><li>
|
||||
<p>overwrite the value for <code>$pt_pm_fqdn</code>to match your puppetmaster’s fqdn. <strong>This will overwrite the puppet.conf with the settings set in params.pp. It is highly recommended to use a test system first to see and fine tune those settings!</strong> Any node not matching this fqdn will become an agent.</p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Tests">Tests</h2>
|
||||
<ul><li>
|
||||
<p>Puppet Lint</p>
|
||||
</li><li>
|
||||
<p>excluded tests:</p>
|
||||
<ul><li>
|
||||
<p><code>--no-variable_scope-check</code>: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.</p>
|
||||
</li></ul>
|
||||
</li><li>
|
||||
<p>Puppet Parser</p>
|
||||
</li><li>
|
||||
<p>ERB Template Parser</p>
|
||||
</li><li>
|
||||
<p>Sonar Quality Gate</p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Contact+Us">Contact Us</h2>
|
||||
<ul><li>
|
||||
<p><a href="https://confdroid.com/contact/">contact form</a></p>
|
||||
</li><li>
|
||||
<p><a href="https://feedback.confdroid.com/">feedback portal</a></p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Documentation">Documentation</h2>
|
||||
|
||||
<p>Additional documentation like FAQ can be found in the wiki</strong><a href="https://3for.me/x1mar"></a>.</p>
|
||||
|
||||
<h2 id="label-Disclaimer">Disclaimer</h2>
|
||||
|
||||
<p>ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments. The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.</p>
|
||||
</div></div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
22
doc/frames.html
Normal file
22
doc/frames.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Documentation by YARD 0.9.36</title>
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
var mainUrl = 'index.html';
|
||||
try {
|
||||
var match = decodeURIComponent(window.location.hash).match(/^#!(.+)/);
|
||||
var name = match ? match[1] : mainUrl;
|
||||
var url = new URL(name, location.href);
|
||||
window.top.location.replace(url.origin === location.origin ? name : mainUrl);
|
||||
} catch (e) {
|
||||
window.top.location.replace(mainUrl);
|
||||
}
|
||||
</script>
|
||||
<noscript>
|
||||
<h1>Oops!</h1>
|
||||
<h2>YARD requires JavaScript!</h2>
|
||||
</noscript>
|
||||
</html>
|
||||
236
doc/index.html
Normal file
236
doc/index.html
Normal file
@@ -0,0 +1,236 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
File: README
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "";
|
||||
relpath = '';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="_index.html">Index</a> »
|
||||
<span class="title">File: README</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><div id='filecontents'>
|
||||
<h1 id="label-Readme">Readme</h1>
|
||||
|
||||
<p><a href="https://jenkins.confdroid.com/job/confdroid_puppet/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_puppet"></a> <a href="https://sonarqube.confdroid.com/dashboard?id=confdroid_puppet"><img src="https://sonarqube.confdroid.com/api/project_badges/measure?project=confdroid_puppet&metric=security_hotspots&token=sqb_97a025b42213e7290a4f6e3d459957ee96c49db8"></a> <a href="https://deepwiki.com/grizzlycoda/puppet_collection"><img src="https://deepwiki.com/badge.svg"></a></p>
|
||||
<ul><li>
|
||||
<p><a href="#readme">Readme</a></p>
|
||||
</li><li>
|
||||
<p><a href="#synopsis">Synopsis</a></p>
|
||||
</li><li>
|
||||
<p><a href="#warning">WARNING</a></p>
|
||||
</li><li>
|
||||
<p><a href="#features">Features</a></p>
|
||||
<ul><li>
|
||||
<p><a href="#puppet-server-and-agent">Puppet server and agent</a></p>
|
||||
</li><li>
|
||||
<p><a href="#firewall">Firewall</a></p>
|
||||
</li><li>
|
||||
<p><a href="#directories-files-and-services">Directories, Files and Services</a></p>
|
||||
</li><li>
|
||||
<p><a href="#optional">Optional</a></p>
|
||||
</li><li>
|
||||
<p><a href="#r10k-service">R10k service</a></p>
|
||||
</li><li>
|
||||
<p><a href="#r10k-web-hook">R10k Web hook</a></p>
|
||||
</li><li>
|
||||
<p><a href="#puppetdb">Puppetdb</a></p>
|
||||
</li></ul>
|
||||
</li><li>
|
||||
<p><a href="#support">Support</a></p>
|
||||
</li><li>
|
||||
<p><a href="#parameter-inheritance">Parameter Inheritance</a></p>
|
||||
</li><li>
|
||||
<p><a href="#module-deployment">Module Deployment</a></p>
|
||||
<ul><li>
|
||||
<p><a href="#native-puppet-deployment-via-sitepp-or-nodespp">native Puppet deployment: via site.pp or nodes.pp</a></p>
|
||||
</li><li>
|
||||
<p><a href="#through-foreman">through Foreman</a></p>
|
||||
</li></ul>
|
||||
</li><li>
|
||||
<p><a href="#tests">Tests</a></p>
|
||||
</li><li>
|
||||
<p><a href="#contact-us">Contact Us</a></p>
|
||||
</li><li>
|
||||
<p><a href="#documentation">Documentation</a></p>
|
||||
</li><li>
|
||||
<p><a href="#disclaimer">Disclaimer</a></p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Synopsis">Synopsis</h2>
|
||||
|
||||
<p>This Puppet module configures settings a full Puppet environment, i.e. Puppet master, Puppet agents pointed to the master.</p>
|
||||
|
||||
<p>Optionally:</p>
|
||||
<ul><li>
|
||||
<p>R10k to connect to a control repo and manage puppet modules</p>
|
||||
</li><li>
|
||||
<p>webhook listener to trigger r10k when a puppet module has been updated.</p>
|
||||
</li><li>
|
||||
<p>PuppetDB for exporting and storing resources.</p>
|
||||
</li></ul>
|
||||
|
||||
<p>The syntax is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. This module is also designed to work with <a href="https://www.theforeman.org/manuals/3.13/quickstart_guide.html">Foreman</a> as External Node Classifier (ENC), although it does not install Foreman.</p>
|
||||
|
||||
<h2 id="label-WARNING">WARNING</h2>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<h2 id="label-Features">Features</h2>
|
||||
|
||||
<h3 id="label-Puppet+server+and+agent">Puppet server and agent</h3>
|
||||
<ul><li>
|
||||
<p>if the host FQDN matches your specified Puppet master via <code>$pt_pm_fqdn</code>, it installs and configures a puppetmaster ready for serving with Foreman as ENC (Foreman not yet included). It specifically rewrites the puppet.conf with values taken from parameters.</p>
|
||||
</li><li>
|
||||
<p>Any other system becomes a puppet agent.</p>
|
||||
</li></ul>
|
||||
|
||||
<h3 id="label-Firewall">Firewall</h3>
|
||||
<ul><li>
|
||||
<p>open firewall ports depending on choices above</p>
|
||||
</li></ul>
|
||||
|
||||
<h3 id="label-Directories-2C+Files+and+Services">Directories, Files and Services</h3>
|
||||
<ul><li>
|
||||
<p>manage directories and required files including permissions and selinux context (todo)</p>
|
||||
</li><li>
|
||||
<p>start services as required</p>
|
||||
</li></ul>
|
||||
|
||||
<h3 id="label-Optional">Optional</h3>
|
||||
|
||||
<h4 id="label-R10k+service">R10k service</h4>
|
||||
<ul><li>
|
||||
<p>install r10k service on your puppetmaster. If you set <code>$pt_use_r10k</code>to <code>true</code>, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile.</p>
|
||||
</li></ul>
|
||||
|
||||
<h4 id="label-R10k+Web+hook">R10k Web hook</h4>
|
||||
<ul><li>
|
||||
<p>installs a webhook listener If you set <code>$pt_use_r10k_webhook</code>to <code>true</code>, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.</p>
|
||||
</li></ul>
|
||||
|
||||
<h4 id="label-Puppetdb">Puppetdb</h4>
|
||||
<ul><li>
|
||||
<p>installs and configures Puppetdb on the node specified with <code>pt_puppetdb_fqdn</code>, which can be the puppetmaster or any other node (recommended for performance reasons)</p>
|
||||
</li><li>
|
||||
<p>the logrotation can be set in max days via <code>pt_pptdb_log_max_age</code></p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Support">Support</h2>
|
||||
<ul><li>
|
||||
<p>Rocky 9</p>
|
||||
</li><li>
|
||||
<p>Puppet Core 8</p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Parameter+Inheritance">Parameter Inheritance</h2>
|
||||
|
||||
<p>All parameters are listed in <code>params.pp</code> and inherited from there. Variable parameters are in the upper section and also documented in the top. These can be overridden by the ENC. Parameters in the bottom section (curly brackets) cannot be overridden and usually are used for keeping the code in the classes more readable.</p>
|
||||
|
||||
<h2 id="label-Module+Deployment">Module Deployment</h2>
|
||||
|
||||
<h3 id="label-native+Puppet+deployment-3A+via+site.pp+or+nodes.pp">native Puppet deployment: via site.pp or nodes.pp</h3>
|
||||
|
||||
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_include'>include</span> <span class='id identifier rubyid_confdroid_puppet'>confdroid_puppet</span>
|
||||
</code></pre>
|
||||
|
||||
<h3 id="label-through+Foreman">through Foreman</h3>
|
||||
<ul><li>
|
||||
<p>ensure the module is present on the puppetmaster running Foreman in the module path, i.e. /etc/puppetlabs/code/environments/production/ . use r10k or clone the module there through git</p>
|
||||
</li><li>
|
||||
<p>import the module in Foreman</p>
|
||||
</li><li>
|
||||
<p>assign <code>confdroid_puppet::params</code> to the nodes in question, typically a host group.</p>
|
||||
</li><li>
|
||||
<p>overwrite the value for <code>$pt_pm_fqdn</code>to match your puppetmaster’s fqdn. <strong>This will overwrite the puppet.conf with the settings set in params.pp. It is highly recommended to use a test system first to see and fine tune those settings!</strong> Any node not matching this fqdn will become an agent.</p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Tests">Tests</h2>
|
||||
<ul><li>
|
||||
<p>Puppet Lint</p>
|
||||
</li><li>
|
||||
<p>excluded tests:</p>
|
||||
<ul><li>
|
||||
<p><code>--no-variable_scope-check</code>: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.</p>
|
||||
</li></ul>
|
||||
</li><li>
|
||||
<p>Puppet Parser</p>
|
||||
</li><li>
|
||||
<p>ERB Template Parser</p>
|
||||
</li><li>
|
||||
<p>Sonar Quality Gate</p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Contact+Us">Contact Us</h2>
|
||||
<ul><li>
|
||||
<p><a href="https://confdroid.com/contact/">contact form</a></p>
|
||||
</li><li>
|
||||
<p><a href="https://feedback.confdroid.com/">feedback portal</a></p>
|
||||
</li></ul>
|
||||
|
||||
<h2 id="label-Documentation">Documentation</h2>
|
||||
|
||||
<p>Additional documentation like FAQ can be found in the wiki</strong><a href="https://3for.me/x1mar"></a>.</p>
|
||||
|
||||
<h2 id="label-Disclaimer">Disclaimer</h2>
|
||||
|
||||
<p>ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments. The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.</p>
|
||||
</div></div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
314
doc/js/app.js
Normal file
314
doc/js/app.js
Normal file
@@ -0,0 +1,314 @@
|
||||
(function() {
|
||||
|
||||
var localStorage = {}, sessionStorage = {};
|
||||
try { localStorage = window.localStorage; } catch (e) { }
|
||||
try { sessionStorage = window.sessionStorage; } catch (e) { }
|
||||
|
||||
function createSourceLinks() {
|
||||
$('.method_details_list .source_code').
|
||||
before("<span class='showSource'>[<a href='#' class='toggleSource'>View source</a>]</span>");
|
||||
$('.toggleSource').toggle(function() {
|
||||
$(this).parent().nextAll('.source_code').slideDown(100);
|
||||
$(this).text("Hide source");
|
||||
},
|
||||
function() {
|
||||
$(this).parent().nextAll('.source_code').slideUp(100);
|
||||
$(this).text("View source");
|
||||
});
|
||||
}
|
||||
|
||||
function createDefineLinks() {
|
||||
var tHeight = 0;
|
||||
$('.defines').after(" <a href='#' class='toggleDefines'>more...</a>");
|
||||
$('.toggleDefines').toggle(function() {
|
||||
tHeight = $(this).parent().prev().height();
|
||||
$(this).prev().css('display', 'inline');
|
||||
$(this).parent().prev().height($(this).parent().height());
|
||||
$(this).text("(less)");
|
||||
},
|
||||
function() {
|
||||
$(this).prev().hide();
|
||||
$(this).parent().prev().height(tHeight);
|
||||
$(this).text("more...");
|
||||
});
|
||||
}
|
||||
|
||||
function createFullTreeLinks() {
|
||||
var tHeight = 0;
|
||||
$('.inheritanceTree').toggle(function() {
|
||||
tHeight = $(this).parent().prev().height();
|
||||
$(this).parent().toggleClass('showAll');
|
||||
$(this).text("(hide)");
|
||||
$(this).parent().prev().height($(this).parent().height());
|
||||
},
|
||||
function() {
|
||||
$(this).parent().toggleClass('showAll');
|
||||
$(this).parent().prev().height(tHeight);
|
||||
$(this).text("show all");
|
||||
});
|
||||
}
|
||||
|
||||
function searchFrameButtons() {
|
||||
$('.full_list_link').click(function() {
|
||||
toggleSearchFrame(this, $(this).attr('href'));
|
||||
return false;
|
||||
});
|
||||
window.addEventListener('message', function(e) {
|
||||
if (e.data === 'navEscape') {
|
||||
$('#nav').slideUp(100);
|
||||
$('#search a').removeClass('active inactive');
|
||||
$(window).focus();
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
if ($('#search:visible').length === 0) {
|
||||
$('#nav').removeAttr('style');
|
||||
$('#search a').removeClass('active inactive');
|
||||
$(window).focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function toggleSearchFrame(id, link) {
|
||||
var frame = $('#nav');
|
||||
$('#search a').removeClass('active').addClass('inactive');
|
||||
if (frame.attr('src') === link && frame.css('display') !== "none") {
|
||||
frame.slideUp(100);
|
||||
$('#search a').removeClass('active inactive');
|
||||
}
|
||||
else {
|
||||
$(id).addClass('active').removeClass('inactive');
|
||||
if (frame.attr('src') !== link) frame.attr('src', link);
|
||||
frame.slideDown(100);
|
||||
}
|
||||
}
|
||||
|
||||
function linkSummaries() {
|
||||
$('.summary_signature').click(function() {
|
||||
document.location = $(this).find('a').attr('href');
|
||||
});
|
||||
}
|
||||
|
||||
function summaryToggle() {
|
||||
$('.summary_toggle').click(function(e) {
|
||||
e.preventDefault();
|
||||
localStorage.summaryCollapsed = $(this).text();
|
||||
$('.summary_toggle').each(function() {
|
||||
$(this).text($(this).text() == "collapse" ? "expand" : "collapse");
|
||||
var next = $(this).parent().parent().nextAll('ul.summary').first();
|
||||
if (next.hasClass('compact')) {
|
||||
next.toggle();
|
||||
next.nextAll('ul.summary').first().toggle();
|
||||
}
|
||||
else if (next.hasClass('summary')) {
|
||||
var list = $('<ul class="summary compact" />');
|
||||
list.html(next.html());
|
||||
list.find('.summary_desc, .note').remove();
|
||||
list.find('a').each(function() {
|
||||
$(this).html($(this).find('strong').html());
|
||||
$(this).parent().html($(this)[0].outerHTML);
|
||||
});
|
||||
next.before(list);
|
||||
next.toggle();
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
if (localStorage.summaryCollapsed == "collapse") {
|
||||
$('.summary_toggle').first().click();
|
||||
} else { localStorage.summaryCollapsed = "expand"; }
|
||||
}
|
||||
|
||||
function constantSummaryToggle() {
|
||||
$('.constants_summary_toggle').click(function(e) {
|
||||
e.preventDefault();
|
||||
localStorage.summaryCollapsed = $(this).text();
|
||||
$('.constants_summary_toggle').each(function() {
|
||||
$(this).text($(this).text() == "collapse" ? "expand" : "collapse");
|
||||
var next = $(this).parent().parent().nextAll('dl.constants').first();
|
||||
if (next.hasClass('compact')) {
|
||||
next.toggle();
|
||||
next.nextAll('dl.constants').first().toggle();
|
||||
}
|
||||
else if (next.hasClass('constants')) {
|
||||
var list = $('<dl class="constants compact" />');
|
||||
list.html(next.html());
|
||||
list.find('dt').each(function() {
|
||||
$(this).addClass('summary_signature');
|
||||
$(this).text( $(this).text().split('=')[0]);
|
||||
if ($(this).has(".deprecated").length) {
|
||||
$(this).addClass('deprecated');
|
||||
};
|
||||
});
|
||||
// Add the value of the constant as "Tooltip" to the summary object
|
||||
list.find('pre.code').each(function() {
|
||||
console.log($(this).parent());
|
||||
var dt_element = $(this).parent().prev();
|
||||
var tooltip = $(this).text();
|
||||
if (dt_element.hasClass("deprecated")) {
|
||||
tooltip = 'Deprecated. ' + tooltip;
|
||||
};
|
||||
dt_element.attr('title', tooltip);
|
||||
});
|
||||
list.find('.docstring, .tags, dd').remove();
|
||||
next.before(list);
|
||||
next.toggle();
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
if (localStorage.summaryCollapsed == "collapse") {
|
||||
$('.constants_summary_toggle').first().click();
|
||||
} else { localStorage.summaryCollapsed = "expand"; }
|
||||
}
|
||||
|
||||
function generateTOC() {
|
||||
if ($('#filecontents').length === 0) return;
|
||||
var _toc = $('<ol class="top"></ol>');
|
||||
var show = false;
|
||||
var toc = _toc;
|
||||
var counter = 0;
|
||||
var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
|
||||
var i;
|
||||
var curli;
|
||||
if ($('#filecontents h1').length > 1) tags.unshift('h1');
|
||||
for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
|
||||
var lastTag = parseInt(tags[0][1], 10);
|
||||
$(tags.join(', ')).each(function() {
|
||||
if ($(this).parents('.method_details .docstring').length != 0) return;
|
||||
if (this.id == "filecontents") return;
|
||||
show = true;
|
||||
var thisTag = parseInt(this.tagName[1], 10);
|
||||
if (this.id.length === 0) {
|
||||
var proposedId = $(this).attr('toc-id');
|
||||
if (typeof(proposedId) != "undefined") this.id = proposedId;
|
||||
else {
|
||||
var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_');
|
||||
if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; }
|
||||
this.id = proposedId;
|
||||
}
|
||||
}
|
||||
if (thisTag > lastTag) {
|
||||
for (i = 0; i < thisTag - lastTag; i++) {
|
||||
if ( typeof(curli) == "undefined" ) {
|
||||
curli = $('<li/>');
|
||||
toc.append(curli);
|
||||
}
|
||||
toc = $('<ol/>');
|
||||
curli.append(toc);
|
||||
curli = undefined;
|
||||
}
|
||||
}
|
||||
if (thisTag < lastTag) {
|
||||
for (i = 0; i < lastTag - thisTag; i++) {
|
||||
toc = toc.parent();
|
||||
toc = toc.parent();
|
||||
}
|
||||
}
|
||||
var title = $(this).attr('toc-title');
|
||||
if (typeof(title) == "undefined") title = $(this).text();
|
||||
curli =$('<li><a href="#' + this.id + '">' + title + '</a></li>');
|
||||
toc.append(curli);
|
||||
lastTag = thisTag;
|
||||
});
|
||||
if (!show) return;
|
||||
html = '<div id="toc"><p class="title hide_toc"><a href="#"><strong>Table of Contents</strong></a></p></div>';
|
||||
$('#content').prepend(html);
|
||||
$('#toc').append(_toc);
|
||||
$('#toc .hide_toc').toggle(function() {
|
||||
$('#toc .top').slideUp('fast');
|
||||
$('#toc').toggleClass('hidden');
|
||||
$('#toc .title small').toggle();
|
||||
}, function() {
|
||||
$('#toc .top').slideDown('fast');
|
||||
$('#toc').toggleClass('hidden');
|
||||
$('#toc .title small').toggle();
|
||||
});
|
||||
}
|
||||
|
||||
function navResizeFn(e) {
|
||||
if (e.which !== 1) {
|
||||
navResizeFnStop();
|
||||
return;
|
||||
}
|
||||
|
||||
sessionStorage.navWidth = e.pageX.toString();
|
||||
$('.nav_wrap').css('width', e.pageX);
|
||||
$('.nav_wrap').css('-ms-flex', 'inherit');
|
||||
}
|
||||
|
||||
function navResizeFnStop() {
|
||||
$(window).unbind('mousemove', navResizeFn);
|
||||
window.removeEventListener('message', navMessageFn, false);
|
||||
}
|
||||
|
||||
function navMessageFn(e) {
|
||||
if (e.data.action === 'mousemove') navResizeFn(e.data.event);
|
||||
if (e.data.action === 'mouseup') navResizeFnStop();
|
||||
}
|
||||
|
||||
function navResizer() {
|
||||
$('#resizer').mousedown(function(e) {
|
||||
e.preventDefault();
|
||||
$(window).mousemove(navResizeFn);
|
||||
window.addEventListener('message', navMessageFn, false);
|
||||
});
|
||||
$(window).mouseup(navResizeFnStop);
|
||||
|
||||
if (sessionStorage.navWidth) {
|
||||
navResizeFn({which: 1, pageX: parseInt(sessionStorage.navWidth, 10)});
|
||||
}
|
||||
}
|
||||
|
||||
function navExpander() {
|
||||
var done = false, timer = setTimeout(postMessage, 500);
|
||||
function postMessage() {
|
||||
if (done) return;
|
||||
clearTimeout(timer);
|
||||
var opts = { action: 'expand', path: pathId };
|
||||
document.getElementById('nav').contentWindow.postMessage(opts, '*');
|
||||
done = true;
|
||||
}
|
||||
|
||||
window.addEventListener('message', function(event) {
|
||||
if (event.data === 'navReady') postMessage();
|
||||
return false;
|
||||
}, false);
|
||||
}
|
||||
|
||||
function mainFocus() {
|
||||
var hash = window.location.hash;
|
||||
if (hash !== '' && $(hash)[0]) {
|
||||
$(hash)[0].scrollIntoView();
|
||||
}
|
||||
|
||||
setTimeout(function() { $('#main').focus(); }, 10);
|
||||
}
|
||||
|
||||
function navigationChange() {
|
||||
// This works around the broken anchor navigation with the YARD template.
|
||||
window.onpopstate = function() {
|
||||
var hash = window.location.hash;
|
||||
if (hash !== '' && $(hash)[0]) {
|
||||
$(hash)[0].scrollIntoView();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
navResizer();
|
||||
navExpander();
|
||||
createSourceLinks();
|
||||
createDefineLinks();
|
||||
createFullTreeLinks();
|
||||
searchFrameButtons();
|
||||
linkSummaries();
|
||||
summaryToggle();
|
||||
constantSummaryToggle();
|
||||
generateTOC();
|
||||
mainFocus();
|
||||
navigationChange();
|
||||
});
|
||||
|
||||
})();
|
||||
216
doc/js/full_list.js
Normal file
216
doc/js/full_list.js
Normal file
@@ -0,0 +1,216 @@
|
||||
(function() {
|
||||
|
||||
var $clicked = $(null);
|
||||
var searchTimeout = null;
|
||||
var searchCache = [];
|
||||
var caseSensitiveMatch = false;
|
||||
var ignoreKeyCodeMin = 8;
|
||||
var ignoreKeyCodeMax = 46;
|
||||
var commandKey = 91;
|
||||
|
||||
RegExp.escape = function(text) {
|
||||
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
||||
}
|
||||
|
||||
function escapeShortcut() {
|
||||
$(document).keydown(function(evt) {
|
||||
if (evt.which == 27) {
|
||||
window.parent.postMessage('navEscape', '*');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function navResizer() {
|
||||
$(window).mousemove(function(e) {
|
||||
window.parent.postMessage({
|
||||
action: 'mousemove', event: {pageX: e.pageX, which: e.which}
|
||||
}, '*');
|
||||
}).mouseup(function(e) {
|
||||
window.parent.postMessage({action: 'mouseup'}, '*');
|
||||
});
|
||||
window.parent.postMessage("navReady", "*");
|
||||
}
|
||||
|
||||
function clearSearchTimeout() {
|
||||
clearTimeout(searchTimeout);
|
||||
searchTimeout = null;
|
||||
}
|
||||
|
||||
function enableLinks() {
|
||||
// load the target page in the parent window
|
||||
$('#full_list li').on('click', function(evt) {
|
||||
$('#full_list li').removeClass('clicked');
|
||||
$clicked = $(this);
|
||||
$clicked.addClass('clicked');
|
||||
evt.stopPropagation();
|
||||
|
||||
if (evt.target.tagName === 'A') return true;
|
||||
|
||||
var elem = $clicked.find('> .item .object_link a')[0];
|
||||
var e = evt.originalEvent;
|
||||
var newEvent = new MouseEvent(evt.originalEvent.type);
|
||||
newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
|
||||
elem.dispatchEvent(newEvent);
|
||||
evt.preventDefault();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function enableToggles() {
|
||||
// show/hide nested classes on toggle click
|
||||
$('#full_list a.toggle').on('click', function(evt) {
|
||||
evt.stopPropagation();
|
||||
evt.preventDefault();
|
||||
$(this).parent().parent().toggleClass('collapsed');
|
||||
highlight();
|
||||
});
|
||||
}
|
||||
|
||||
function populateSearchCache() {
|
||||
$('#full_list li .item').each(function() {
|
||||
var $node = $(this);
|
||||
var $link = $node.find('.object_link a');
|
||||
if ($link.length > 0) {
|
||||
searchCache.push({
|
||||
node: $node,
|
||||
link: $link,
|
||||
name: $link.text(),
|
||||
fullName: $link.attr('title').split(' ')[0]
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function enableSearch() {
|
||||
$('#search input').keyup(function(event) {
|
||||
if (ignoredKeyPress(event)) return;
|
||||
if (this.value === "") {
|
||||
clearSearch();
|
||||
} else {
|
||||
performSearch(this.value);
|
||||
}
|
||||
});
|
||||
|
||||
$('#full_list').after("<div id='noresults' style='display:none'></div>");
|
||||
}
|
||||
|
||||
function ignoredKeyPress(event) {
|
||||
if (
|
||||
(event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) ||
|
||||
(event.keyCode == commandKey)
|
||||
) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function clearSearch() {
|
||||
clearSearchTimeout();
|
||||
$('#full_list .found').removeClass('found').each(function() {
|
||||
var $link = $(this).find('.object_link a');
|
||||
$link.text($link.text());
|
||||
});
|
||||
$('#full_list, #content').removeClass('insearch');
|
||||
$clicked.parents().removeClass('collapsed');
|
||||
highlight();
|
||||
}
|
||||
|
||||
function performSearch(searchString) {
|
||||
clearSearchTimeout();
|
||||
$('#full_list, #content').addClass('insearch');
|
||||
$('#noresults').text('').hide();
|
||||
partialSearch(searchString, 0);
|
||||
}
|
||||
|
||||
function partialSearch(searchString, offset) {
|
||||
var lastRowClass = '';
|
||||
var i = null;
|
||||
for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) {
|
||||
var item = searchCache[i];
|
||||
var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name);
|
||||
var matchString = buildMatchString(searchString);
|
||||
var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i");
|
||||
if (searchName.match(matchRegexp) == null) {
|
||||
item.node.removeClass('found');
|
||||
item.link.text(item.link.text());
|
||||
}
|
||||
else {
|
||||
item.node.addClass('found');
|
||||
item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1');
|
||||
lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2';
|
||||
item.link.html(item.name.replace(matchRegexp, "<strong>$&</strong>"));
|
||||
}
|
||||
}
|
||||
if(i == searchCache.length) {
|
||||
searchDone();
|
||||
} else {
|
||||
searchTimeout = setTimeout(function() {
|
||||
partialSearch(searchString, i);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
function searchDone() {
|
||||
searchTimeout = null;
|
||||
highlight();
|
||||
if ($('#full_list li:visible').size() === 0) {
|
||||
$('#noresults').text('No results were found.').hide().fadeIn();
|
||||
} else {
|
||||
$('#noresults').text('').hide();
|
||||
}
|
||||
$('#content').removeClass('insearch');
|
||||
}
|
||||
|
||||
function buildMatchString(searchString, event) {
|
||||
caseSensitiveMatch = searchString.match(/[A-Z]/) != null;
|
||||
var regexSearchString = RegExp.escape(searchString);
|
||||
if (caseSensitiveMatch) {
|
||||
regexSearchString += "|" +
|
||||
$.map(searchString.split(''), function(e) { return RegExp.escape(e); }).
|
||||
join('.+?');
|
||||
}
|
||||
return regexSearchString;
|
||||
}
|
||||
|
||||
function highlight() {
|
||||
$('#full_list li:visible').each(function(n) {
|
||||
$(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Expands the tree to the target element and its immediate
|
||||
* children.
|
||||
*/
|
||||
function expandTo(path) {
|
||||
var $target = $(document.getElementById('object_' + path));
|
||||
$target.addClass('clicked');
|
||||
$target.removeClass('collapsed');
|
||||
$target.parentsUntil('#full_list', 'li').removeClass('collapsed');
|
||||
if($target[0]) {
|
||||
window.scrollTo(window.scrollX, $target.offset().top - 250);
|
||||
highlight();
|
||||
}
|
||||
}
|
||||
|
||||
function windowEvents(event) {
|
||||
var msg = event.data;
|
||||
if (msg.action === "expand") {
|
||||
expandTo(msg.path);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
window.addEventListener("message", windowEvents, false);
|
||||
|
||||
$(document).ready(function() {
|
||||
escapeShortcut();
|
||||
navResizer();
|
||||
enableLinks();
|
||||
enableToggles();
|
||||
populateSearchCache();
|
||||
enableSearch();
|
||||
});
|
||||
|
||||
})();
|
||||
4
doc/js/jquery.js
vendored
Normal file
4
doc/js/jquery.js
vendored
Normal file
File diff suppressed because one or more lines are too long
120
doc/puppet_class_list.html
Normal file
120
doc/puppet_class_list.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
|
||||
|
||||
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
|
||||
|
||||
|
||||
<title>Puppet Class List</title>
|
||||
<base id="base_target" target="_parent" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<div class="fixed_header">
|
||||
<h1 id="full_list_header">Puppet Class List</h1>
|
||||
<div id="full_list_nav">
|
||||
|
||||
<span><a target="_self" href="puppet_class_list.html">
|
||||
Puppet Classes
|
||||
</a></span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">Search: <input type="text" /></div>
|
||||
</div>
|
||||
|
||||
<ul id="full_list" class="puppet_class">
|
||||
|
||||
|
||||
<li id="object_puppet_classes::confdroid_puppet" class="odd">
|
||||
<div class="item">
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet.html" title="puppet_classes::confdroid_puppet (puppet_class)">confdroid_puppet</a></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li id="object_puppet_classes::confdroid_puppet::firewall::iptables" class="even">
|
||||
<div class="item">
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::confdroid_puppet::firewall::iptables (puppet_class)">confdroid_puppet::firewall::iptables</a></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li id="object_puppet_classes::confdroid_puppet::main::config" class="odd">
|
||||
<div class="item">
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::confdroid_puppet::main::config (puppet_class)">confdroid_puppet::main::config</a></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li id="object_puppet_classes::confdroid_puppet::main::dirs" class="even">
|
||||
<div class="item">
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Amain_3A_3Adirs.html" title="puppet_classes::confdroid_puppet::main::dirs (puppet_class)">confdroid_puppet::main::dirs</a></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li id="object_puppet_classes::confdroid_puppet::main::files" class="odd">
|
||||
<div class="item">
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Amain_3A_3Afiles.html" title="puppet_classes::confdroid_puppet::main::files (puppet_class)">confdroid_puppet::main::files</a></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li id="object_puppet_classes::confdroid_puppet::main::install" class="even">
|
||||
<div class="item">
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::confdroid_puppet::main::install (puppet_class)">confdroid_puppet::main::install</a></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li id="object_puppet_classes::confdroid_puppet::params" class="odd">
|
||||
<div class="item">
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li id="object_puppet_classes::confdroid_puppet::puppetdb::dirs" class="even">
|
||||
<div class="item">
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Apuppetdb_3A_3Adirs.html" title="puppet_classes::confdroid_puppet::puppetdb::dirs (puppet_class)">confdroid_puppet::puppetdb::dirs</a></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li id="object_puppet_classes::confdroid_puppet::puppetdb::files" class="odd">
|
||||
<div class="item">
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Apuppetdb_3A_3Afiles.html" title="puppet_classes::confdroid_puppet::puppetdb::files (puppet_class)">confdroid_puppet::puppetdb::files</a></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li id="object_puppet_classes::confdroid_puppet::r10k::install" class="even">
|
||||
<div class="item">
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Ar10k_3A_3Ainstall.html" title="puppet_classes::confdroid_puppet::r10k::install (puppet_class)">confdroid_puppet::r10k::install</a></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li id="object_puppet_classes::confdroid_puppet::server::service" class="odd">
|
||||
<div class="item">
|
||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_puppet::server::service (puppet_class)">confdroid_puppet::server::service</a></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
121
doc/puppet_classes/confdroid_puppet.html
Normal file
121
doc/puppet_classes/confdroid_puppet.html
Normal file
@@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: confdroid_puppet
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "puppet_classes::confdroid_puppet";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">confdroid_puppet</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: confdroid_puppet</h1>
|
||||
<div class="box_info">
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/init.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class initialize the confdroid_puppet module.
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>confdroid_puppet::init.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tags">
|
||||
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
6
|
||||
7
|
||||
8</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/init.pp', line 6</span>
|
||||
|
||||
class confdroid_puppet {
|
||||
include confdroid_puppet::params
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,182 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: confdroid_puppet::firewall::iptables
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "puppet_classes::confdroid_puppet::firewall::iptables";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">confdroid_puppet::firewall::iptables</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: confdroid_puppet::firewall::iptables</h1>
|
||||
<div class="box_info">
|
||||
|
||||
<dl>
|
||||
<dt>Inherits:</dt>
|
||||
<dd><span class='object_link'><a href="confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/firewall/iptables.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class manages firewall settings for the confdroid_puppet module.
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>confdroid_puppet::firewall::iptables.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tags">
|
||||
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/firewall/iptables.pp', line 6</span>
|
||||
|
||||
class confdroid_puppet::firewall::iptables (
|
||||
|
||||
) inherits confdroid_puppet::params {
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
firewall { '38140 open port 8140':
|
||||
proto => 'tcp',
|
||||
dport => '8140',
|
||||
jump => 'accept',
|
||||
}
|
||||
firewall { '38443 open port 8443':
|
||||
proto => 'tcp',
|
||||
dport => '8443',
|
||||
jump => 'accept',
|
||||
}
|
||||
if $pt_use_r10k_webhook == true {
|
||||
firewall { "3${pt_r10k_webhook_port} open port ${pt_r10k_webhook_port}":
|
||||
proto => 'tcp',
|
||||
source => '10.0.1.0/24',
|
||||
dport => $pt_r10k_webhook_port,
|
||||
jump => 'accept',
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($pt_puppetdb_fqdn == $fqdn) and ($pt_use_puppetdb == true) {
|
||||
firewall { "3${pt_https_port} open port ${pt_https_port}":
|
||||
proto => 'tcp',
|
||||
dport => $pt_https_port,
|
||||
jump => 'accept',
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
138
doc/puppet_classes/confdroid_puppet_3A_3Amain_3A_3Aconfig.html
Normal file
138
doc/puppet_classes/confdroid_puppet_3A_3Amain_3A_3Aconfig.html
Normal file
@@ -0,0 +1,138 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: confdroid_puppet::main::config
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "puppet_classes::confdroid_puppet::main::config";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">confdroid_puppet::main::config</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: confdroid_puppet::main::config</h1>
|
||||
<div class="box_info">
|
||||
|
||||
<dl>
|
||||
<dt>Inherits:</dt>
|
||||
<dd><span class='object_link'><a href="confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/main/config.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class manages main logic for the confdroid_puppet module.
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>confdroid_puppet::main::config.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tags">
|
||||
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 6</span>
|
||||
|
||||
class confdroid_puppet::main::config (
|
||||
|
||||
) inherits confdroid_puppet::params {
|
||||
include confdroid_puppet::server::service
|
||||
|
||||
if $pt_use_r10k == true {
|
||||
include confdroid_puppet::r10k::install
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
154
doc/puppet_classes/confdroid_puppet_3A_3Amain_3A_3Adirs.html
Normal file
154
doc/puppet_classes/confdroid_puppet_3A_3Amain_3A_3Adirs.html
Normal file
@@ -0,0 +1,154 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: confdroid_puppet::main::dirs
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "puppet_classes::confdroid_puppet::main::dirs";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">confdroid_puppet::main::dirs</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: confdroid_puppet::main::dirs</h1>
|
||||
<div class="box_info">
|
||||
|
||||
<dl>
|
||||
<dt>Inherits:</dt>
|
||||
<dd><span class='object_link'><a href="confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/main/dirs.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class manages directories for the confdroid_puppet module.
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>confdroid_puppet::main::dirs.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tags">
|
||||
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
||||
|
||||
class confdroid_puppet::main::dirs (
|
||||
|
||||
) inherits confdroid_puppet::params {
|
||||
require confdroid_puppet::main::install
|
||||
|
||||
file { $pt_main_dir:
|
||||
ensure => directory,
|
||||
path => $pt_main_dir,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
328
doc/puppet_classes/confdroid_puppet_3A_3Amain_3A_3Afiles.html
Normal file
328
doc/puppet_classes/confdroid_puppet_3A_3Amain_3A_3Afiles.html
Normal file
@@ -0,0 +1,328 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: confdroid_puppet::main::files
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "puppet_classes::confdroid_puppet::main::files";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">confdroid_puppet::main::files</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: confdroid_puppet::main::files</h1>
|
||||
<div class="box_info">
|
||||
|
||||
<dl>
|
||||
<dt>Inherits:</dt>
|
||||
<dd><span class='object_link'><a href="confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/main/files.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class manages config files for the confdroid_puppet module.
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>confdroid_puppet::main::files.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tags">
|
||||
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49
|
||||
50
|
||||
51
|
||||
52
|
||||
53
|
||||
54
|
||||
55
|
||||
56
|
||||
57
|
||||
58
|
||||
59
|
||||
60
|
||||
61
|
||||
62
|
||||
63
|
||||
64
|
||||
65
|
||||
66
|
||||
67
|
||||
68
|
||||
69
|
||||
70
|
||||
71
|
||||
72
|
||||
73
|
||||
74
|
||||
75
|
||||
76
|
||||
77
|
||||
78
|
||||
79
|
||||
80
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85
|
||||
86
|
||||
87
|
||||
88
|
||||
89
|
||||
90
|
||||
91
|
||||
92
|
||||
93
|
||||
94
|
||||
95
|
||||
96
|
||||
97
|
||||
98
|
||||
99
|
||||
100
|
||||
101
|
||||
102
|
||||
103
|
||||
104
|
||||
105
|
||||
106
|
||||
107
|
||||
108
|
||||
109</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
||||
|
||||
class confdroid_puppet::main::files (
|
||||
|
||||
) inherits confdroid_puppet::params {
|
||||
require confdroid_puppet::main::dirs
|
||||
|
||||
if $fqdn != $pt_pm_fqdn {
|
||||
file { $pt_puppet_conf_file:
|
||||
ensure => file,
|
||||
path => $pt_puppet_conf_file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_puppet_conf_erb),
|
||||
notify => Service[$pt_agent_service],
|
||||
}
|
||||
if $pt_use_puppetdb == true {
|
||||
file { $pt_node_rb_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0550',
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_node_rb_erb),
|
||||
}
|
||||
}
|
||||
if $pt_use_puppetdb != true {
|
||||
file { $pt_node_rb_file:
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
file { $pt_puppet_conf_file:
|
||||
ensure => file,
|
||||
path => $pt_puppet_conf_file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_puppet_conf_erb),
|
||||
notify => Service[$pt_agent_service,$pt_server_service],
|
||||
}
|
||||
|
||||
if $pt_use_puppetdb == true {
|
||||
# puppetdb
|
||||
file { $pt_puppetdb_conf_file:
|
||||
ensure => file,
|
||||
path => $pt_puppetdb_conf_file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_puppetdb_conf_erb),
|
||||
notify => Service[$pt_agent_service,$pt_server_service],
|
||||
}
|
||||
# routes.yaml
|
||||
file { $pt_routes_file:
|
||||
ensure => file,
|
||||
path => $pt_routes_file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_routes_erb),
|
||||
notify => Service[$pt_server_service],
|
||||
}
|
||||
file { $pt_node_rb_file:
|
||||
ensure => file,
|
||||
owner => 'puppet',
|
||||
group => 'puppet',
|
||||
mode => '0550',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => foreman_enc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_node_rb_erb),
|
||||
}
|
||||
}
|
||||
if $pt_use_puppetdb != true {
|
||||
file { $pt_puppetdb_conf_file:
|
||||
ensure => absent,
|
||||
}
|
||||
file { $pt_routes_file:
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
160
doc/puppet_classes/confdroid_puppet_3A_3Amain_3A_3Ainstall.html
Normal file
160
doc/puppet_classes/confdroid_puppet_3A_3Amain_3A_3Ainstall.html
Normal file
@@ -0,0 +1,160 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: confdroid_puppet::main::install
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "puppet_classes::confdroid_puppet::main::install";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">confdroid_puppet::main::install</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: confdroid_puppet::main::install</h1>
|
||||
<div class="box_info">
|
||||
|
||||
<dl>
|
||||
<dt>Inherits:</dt>
|
||||
<dd><span class='object_link'><a href="confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/main/install.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class manages package installation for the confdroid_puppet module.
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>confdroid_puppet::main::install.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tags">
|
||||
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/install.pp', line 6</span>
|
||||
|
||||
class confdroid_puppet::main::install (
|
||||
|
||||
) inherits confdroid_puppet::params {
|
||||
if $fqdn != $pt_pm_fqdn {
|
||||
package { $pt_agent_pkg:
|
||||
ensure => $pt_pkg_ensure,
|
||||
}
|
||||
}
|
||||
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
package { $pt_server_pkg:
|
||||
ensure => $pt_pkg_ensure,
|
||||
}
|
||||
if $pt_use_puppetdb == true {
|
||||
package { $pt_puppetdb_pkg:
|
||||
ensure => $pt_pkg_ensure,
|
||||
}
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1532
doc/puppet_classes/confdroid_puppet_3A_3Aparams.html
Normal file
1532
doc/puppet_classes/confdroid_puppet_3A_3Aparams.html
Normal file
File diff suppressed because it is too large
Load Diff
178
doc/puppet_classes/confdroid_puppet_3A_3Apuppetdb_3A_3Adirs.html
Normal file
178
doc/puppet_classes/confdroid_puppet_3A_3Apuppetdb_3A_3Adirs.html
Normal file
@@ -0,0 +1,178 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: confdroid_puppet::puppetdb::dirs
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "puppet_classes::confdroid_puppet::puppetdb::dirs";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">confdroid_puppet::puppetdb::dirs</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: confdroid_puppet::puppetdb::dirs</h1>
|
||||
<div class="box_info">
|
||||
|
||||
<dl>
|
||||
<dt>Inherits:</dt>
|
||||
<dd><span class='object_link'><a href="confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/puppetdb/dirs.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class manages directories for the puppetdb section
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>confdroid_puppet::puppetdb::dirs.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tags">
|
||||
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/puppetdb/dirs.pp', line 6</span>
|
||||
|
||||
class confdroid_puppet::puppetdb::dirs (
|
||||
|
||||
) inherits confdroid_puppet::params {
|
||||
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
|
||||
require confdroid_puppet::main::install
|
||||
|
||||
file { $pt_puppetdb_dir:
|
||||
ensure => directory,
|
||||
owner => 'puppetdb',
|
||||
group => 'puppetdb',
|
||||
mode => '0750',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
|
||||
file { $pt_puppetdb_conf_dir:
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,456 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: confdroid_puppet::puppetdb::files
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "puppet_classes::confdroid_puppet::puppetdb::files";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">confdroid_puppet::puppetdb::files</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: confdroid_puppet::puppetdb::files</h1>
|
||||
<div class="box_info">
|
||||
|
||||
<dl>
|
||||
<dt>Inherits:</dt>
|
||||
<dd><span class='object_link'><a href="confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/puppetdb/files.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class manages config files for the puppetdb section
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>confdroid_puppet::puppetdb::files.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tags">
|
||||
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49
|
||||
50
|
||||
51
|
||||
52
|
||||
53
|
||||
54
|
||||
55
|
||||
56
|
||||
57
|
||||
58
|
||||
59
|
||||
60
|
||||
61
|
||||
62
|
||||
63
|
||||
64
|
||||
65
|
||||
66
|
||||
67
|
||||
68
|
||||
69
|
||||
70
|
||||
71
|
||||
72
|
||||
73
|
||||
74
|
||||
75
|
||||
76
|
||||
77
|
||||
78
|
||||
79
|
||||
80
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85
|
||||
86
|
||||
87
|
||||
88
|
||||
89
|
||||
90
|
||||
91
|
||||
92
|
||||
93
|
||||
94
|
||||
95
|
||||
96
|
||||
97
|
||||
98
|
||||
99
|
||||
100
|
||||
101
|
||||
102
|
||||
103
|
||||
104
|
||||
105
|
||||
106
|
||||
107
|
||||
108
|
||||
109
|
||||
110
|
||||
111
|
||||
112
|
||||
113
|
||||
114
|
||||
115
|
||||
116
|
||||
117
|
||||
118
|
||||
119
|
||||
120
|
||||
121
|
||||
122
|
||||
123
|
||||
124
|
||||
125
|
||||
126
|
||||
127
|
||||
128
|
||||
129
|
||||
130
|
||||
131
|
||||
132
|
||||
133
|
||||
134
|
||||
135
|
||||
136
|
||||
137
|
||||
138
|
||||
139
|
||||
140
|
||||
141
|
||||
142
|
||||
143
|
||||
144
|
||||
145
|
||||
146
|
||||
147
|
||||
148
|
||||
149
|
||||
150
|
||||
151
|
||||
152
|
||||
153
|
||||
154
|
||||
155
|
||||
156
|
||||
157
|
||||
158
|
||||
159
|
||||
160
|
||||
161
|
||||
162
|
||||
163
|
||||
164
|
||||
165
|
||||
166
|
||||
167
|
||||
168
|
||||
169
|
||||
170
|
||||
171
|
||||
172
|
||||
173</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/puppetdb/files.pp', line 6</span>
|
||||
|
||||
class confdroid_puppet::puppetdb::files (
|
||||
|
||||
) inherits confdroid_puppet::params {
|
||||
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
|
||||
require confdroid_puppet::puppetdb::dirs
|
||||
|
||||
# bootstrap.cfg
|
||||
file { $pt_bootstrap_conf_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_bootstrap_conf_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
# logback.xml
|
||||
file { $pt_logback_conf_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_logback_conf_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
# request-logging.xml
|
||||
file { $pt_logging_conf_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_logging_conf_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
# service config
|
||||
file { $pt_service_conf_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => systemd_unit_file_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_service_conf_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
# conf.d files
|
||||
## auth.conf
|
||||
file { $pt_auth_conf_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_auth_conf_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
# config.ini
|
||||
file { $pt_config_ini_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_config_ini_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
# database.ini
|
||||
file { $pt_db_ini_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_db_ini_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
# jetty.ini
|
||||
file { $pt_jetty_ini_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_jetty_ini_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
# repl.ini
|
||||
file { $pt_repl_ini_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_repl_ini_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
if $pt_enable_tls == true {
|
||||
# create tls certs
|
||||
## ca.crt
|
||||
file { $pt_ca_crt_file:
|
||||
ensure => file,
|
||||
owner => 'puppetdb',
|
||||
group => 'puppetdb',
|
||||
mode => '0440',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_ca_crt_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
## server.crt
|
||||
file { $pt_server_crt_file:
|
||||
ensure => file,
|
||||
owner => 'puppetdb',
|
||||
group => 'puppetdb',
|
||||
mode => '0440',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_server_crt_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
## server.key
|
||||
file { $pt_server_key_file:
|
||||
ensure => file,
|
||||
owner => 'puppetdb',
|
||||
group => 'puppetdb',
|
||||
mode => '0440',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_server_key_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
292
doc/puppet_classes/confdroid_puppet_3A_3Ar10k_3A_3Ainstall.html
Normal file
292
doc/puppet_classes/confdroid_puppet_3A_3Ar10k_3A_3Ainstall.html
Normal file
@@ -0,0 +1,292 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: confdroid_puppet::r10k::install
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "puppet_classes::confdroid_puppet::r10k::install";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">confdroid_puppet::r10k::install</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: confdroid_puppet::r10k::install</h1>
|
||||
<div class="box_info">
|
||||
|
||||
<dl>
|
||||
<dt>Inherits:</dt>
|
||||
<dd><span class='object_link'><a href="confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/r10k/install.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class manages r10k installation for the confdroid_puppet module.
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>confdroid_puppet::r10k::install.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tags">
|
||||
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49
|
||||
50
|
||||
51
|
||||
52
|
||||
53
|
||||
54
|
||||
55
|
||||
56
|
||||
57
|
||||
58
|
||||
59
|
||||
60
|
||||
61
|
||||
62
|
||||
63
|
||||
64
|
||||
65
|
||||
66
|
||||
67
|
||||
68
|
||||
69
|
||||
70
|
||||
71
|
||||
72
|
||||
73
|
||||
74
|
||||
75
|
||||
76
|
||||
77
|
||||
78
|
||||
79
|
||||
80
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85
|
||||
86
|
||||
87
|
||||
88
|
||||
89
|
||||
90
|
||||
91</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/r10k/install.pp', line 6</span>
|
||||
|
||||
class confdroid_puppet::r10k::install (
|
||||
|
||||
) inherits confdroid_puppet::params {
|
||||
if ($pt_pm_fqdn == $fqdn) and ($pt_use_r10k == true) {
|
||||
# enable CRB
|
||||
exec { 'enable_crb':
|
||||
command => 'dnf config-manager --set-enabled crb',
|
||||
unless => 'dnf repolist --disabled | grep -qE "crb|CodeReady"',
|
||||
path => ['/usr/bin', '/bin'],
|
||||
}
|
||||
|
||||
# install required packages
|
||||
package { $pt_r10k_pkg:
|
||||
ensure => $pt_pkg_ensure,
|
||||
before => Package['r10k'],
|
||||
require => Exec['enable_crb'],
|
||||
}
|
||||
|
||||
# install r10k via gem
|
||||
package { 'r10k':
|
||||
ensure => $pt_pkg_ensure,
|
||||
provider => gem,
|
||||
require => Package[$pt_r10k_pkg],
|
||||
}
|
||||
|
||||
# create r10k dir
|
||||
file { 'r10k_dir':
|
||||
ensure => directory,
|
||||
path => $pt_r10k_dir,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => unconfined_u,
|
||||
}
|
||||
|
||||
# configure r10k.yaml
|
||||
file { $pt_r10k_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => unconfined_u,
|
||||
require => File['r10k_dir'],
|
||||
content => template($pt_r10k_erb),
|
||||
}
|
||||
|
||||
if $pt_use_r10k_webhook == true {
|
||||
package { $pt_r10k_webhook_pkg:
|
||||
ensure => present,
|
||||
provider => gem,
|
||||
require => Package[$pt_r10k_pkg],
|
||||
}
|
||||
|
||||
exec { 'create symlink':
|
||||
command => $pt_webhook_link,
|
||||
creates => '/usr/bin/r10k_gitlab_webhook',
|
||||
path => ['/bin', '/usr/bin'],
|
||||
require => Package[$pt_r10k_webhook_pkg],
|
||||
}
|
||||
|
||||
file { $pt_webhook_service_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => unconfined_u,
|
||||
content => template($pt_webhook_service_erb),
|
||||
notify => [Service[$pt_r10k_webhook_service],Exec['systemctl-daemon-reload']],
|
||||
}
|
||||
|
||||
exec { 'systemctl-daemon-reload':
|
||||
command => '/bin/systemctl daemon-reload',
|
||||
refreshonly => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,216 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: confdroid_puppet::server::service
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "puppet_classes::confdroid_puppet::server::service";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">confdroid_puppet::server::service</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: confdroid_puppet::server::service</h1>
|
||||
<div class="box_info">
|
||||
|
||||
<dl>
|
||||
<dt>Inherits:</dt>
|
||||
<dd><span class='object_link'><a href="confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/server/service.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class manages the puppet server service for the confdroid_puppet module.
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>confdroid_puppet::server::service.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tags">
|
||||
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49
|
||||
50
|
||||
51
|
||||
52
|
||||
53</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/server/service.pp', line 6</span>
|
||||
|
||||
class confdroid_puppet::server::service (
|
||||
|
||||
) inherits confdroid_puppet::params {
|
||||
require confdroid_puppet::main::files
|
||||
|
||||
# manage agent service on all nodes
|
||||
service { $pt_agent_service:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
}
|
||||
|
||||
# manage puppet server service
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
require confdroid_puppet::firewall::iptables
|
||||
|
||||
service { $pt_server_service:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
}
|
||||
# manage webhook service
|
||||
if $pt_use_r10k_webhook == true {
|
||||
require confdroid_puppet::r10k::install
|
||||
|
||||
service { $pt_r10k_webhook_service:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
|
||||
require confdroid_puppet::firewall::iptables
|
||||
require confdroid_puppet::puppetdb::files
|
||||
|
||||
service { $pt_db_service:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
98
doc/top-level-namespace.html
Normal file
98
doc/top-level-namespace.html
Normal file
@@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Top Level Namespace
|
||||
|
||||
— Documentation by YARD 0.9.36
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "";
|
||||
relpath = '';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="_index.html">Index</a> »
|
||||
|
||||
|
||||
<span class="title">Top Level Namespace</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Top Level Namespace
|
||||
|
||||
|
||||
|
||||
</h1>
|
||||
<div class="box_info">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,11 +1,11 @@
|
||||
## puppet_cd::firewall::iptables.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::firewall::iptables.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages firewall settings for the puppet_cd module.
|
||||
# @summary Class manages firewall settings for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::firewall::iptables (
|
||||
class confdroid_puppet::firewall::iptables (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
) inherits confdroid_puppet::params {
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
firewall { '38140 open port 8140':
|
||||
proto => 'tcp',
|
||||
@@ -17,28 +17,20 @@ class puppet_cd::firewall::iptables (
|
||||
dport => '8443',
|
||||
jump => 'accept',
|
||||
}
|
||||
}
|
||||
|
||||
if $fqdn == $pt_db_fqdn {
|
||||
if $pt_use_ssl_only != true {
|
||||
firewall { "3${pt_no_ssl_port} open port ${pt_no_ssl_port}":
|
||||
if $pt_use_r10k_webhook == true {
|
||||
firewall { "3${pt_r10k_webhook_port} open port ${pt_r10k_webhook_port}":
|
||||
proto => 'tcp',
|
||||
dport => $pt_no_ssl_port,
|
||||
jump => 'accept',
|
||||
}
|
||||
firewall { "3${pt_ssl_port} open port ${pt_ssl_port}":
|
||||
proto => 'tcp',
|
||||
dport => $pt_ssl_port,
|
||||
source => '10.0.1.0/24',
|
||||
dport => $pt_r10k_webhook_port,
|
||||
jump => 'accept',
|
||||
}
|
||||
}
|
||||
|
||||
if $pt_use_ssl_only == true {
|
||||
firewall { "3${pt_ssl_port} open port ${pt_ssl_port}":
|
||||
proto => 'tcp',
|
||||
dport => $pt_ssl_port,
|
||||
jump => 'accept',
|
||||
}
|
||||
if ($pt_puppetdb_fqdn == $fqdn) and ($pt_use_puppetdb == true) {
|
||||
firewall { "3${pt_https_port} open port ${pt_https_port}":
|
||||
proto => 'tcp',
|
||||
dport => $pt_https_port,
|
||||
jump => 'accept',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
## puppet_cd::init.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::init.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class initialize the puppet_cd module.
|
||||
# @summary Class initialize the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd {
|
||||
include puppet_cd::params
|
||||
class confdroid_puppet {
|
||||
include confdroid_puppet::params
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
## puppet_cd::main::config.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::main::config.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages main logic for the puppet_cd module.
|
||||
# @summary Class manages main logic for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::main::config (
|
||||
class confdroid_puppet::main::config (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
include puppet_cd::server::service
|
||||
) inherits confdroid_puppet::params {
|
||||
include confdroid_puppet::server::service
|
||||
|
||||
if $pt_use_puppetdb == true {
|
||||
include puppet_cd::puppetdb::service
|
||||
if $pt_use_r10k == true {
|
||||
include confdroid_puppet::r10k::install
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
## puppet_cd::main::dirs.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::main::dirs.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages directories for the puppet_cd module.
|
||||
# @summary Class manages directories for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::main::dirs (
|
||||
class confdroid_puppet::main::dirs (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
require puppet_cd::main::install
|
||||
) inherits confdroid_puppet::params {
|
||||
require confdroid_puppet::main::install
|
||||
|
||||
file { $pt_main_dir:
|
||||
ensure => directory,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
## puppet_cd::main::files.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::main::files.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages config files for the puppet_cd module.
|
||||
# @summary Class manages config files for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::main::files (
|
||||
class confdroid_puppet::main::files (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
require puppet_cd::main::dirs
|
||||
) inherits confdroid_puppet::params {
|
||||
require confdroid_puppet::main::dirs
|
||||
|
||||
if $fqdn != $pt_pm_fqdn {
|
||||
file { $pt_puppet_conf_file:
|
||||
@@ -15,9 +15,30 @@ class puppet_cd::main::files (
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_puppet_conf_erb),
|
||||
notify => Service[$pt_agent_service],
|
||||
}
|
||||
if $pt_use_puppetdb == true {
|
||||
file { $pt_node_rb_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0550',
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_node_rb_erb),
|
||||
}
|
||||
}
|
||||
if $pt_use_puppetdb != true {
|
||||
file { $pt_node_rb_file:
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
@@ -27,20 +48,62 @@ class puppet_cd::main::files (
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_puppet_conf_erb),
|
||||
notify => Service[$pt_agent_service,$pt_server_service],
|
||||
}
|
||||
}
|
||||
|
||||
if $pt_use_puppetdb == true {
|
||||
# puppetdb
|
||||
file { $pt_puppetdb_conf_file:
|
||||
ensure => filet,
|
||||
ensure => file,
|
||||
path => $pt_puppetdb_conf_file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_puppetdb_conf_erb),
|
||||
notify => Service[$pt_agent_service,$pt_server_service],
|
||||
}
|
||||
# routes.yaml
|
||||
file { $pt_routes_file:
|
||||
ensure => file,
|
||||
path => $pt_routes_file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_routes_erb),
|
||||
notify => Service[$pt_server_service],
|
||||
}
|
||||
file { $pt_node_rb_file:
|
||||
ensure => file,
|
||||
owner => 'puppet',
|
||||
group => 'puppet',
|
||||
mode => '0550',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => foreman_enc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_node_rb_erb),
|
||||
}
|
||||
}
|
||||
if $pt_use_puppetdb != true {
|
||||
file { $pt_puppetdb_conf_file:
|
||||
ensure => absent,
|
||||
}
|
||||
file { $pt_routes_file:
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
## puppet_cd::main::install.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::main::install.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages package installation for the puppet_cd module.
|
||||
# @summary Class manages package installation for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::main::install (
|
||||
class confdroid_puppet::main::install (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
) inherits confdroid_puppet::params {
|
||||
if $fqdn != $pt_pm_fqdn {
|
||||
package { $pt_agent_pkg:
|
||||
ensure => $pt_pkg_ensure,
|
||||
}
|
||||
}
|
||||
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
package { $pt_server_pkg:
|
||||
ensure => $pt_pkg_ensure,
|
||||
}
|
||||
}
|
||||
|
||||
if $fqdn == $pt_db_fqdn {
|
||||
package { $pt_db_pkg:
|
||||
if $pt_use_puppetdb == true {
|
||||
package { $pt_puppetdb_pkg:
|
||||
ensure => $pt_pkg_ensure,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
## puppet_cd::main::user.pp
|
||||
# Module name: puppet_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages user settings for the puppet_cd module.
|
||||
###############################################################################
|
||||
class puppet_cd::main::user (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
if ($fqdn == $pt_pm_fqdn) and ($pt_manage_user == true) {
|
||||
user { $pt_user:
|
||||
ensure => present,
|
||||
name => $pt_user,
|
||||
allowdupe => false,
|
||||
comment => $pt_user_comment,
|
||||
gid => $pt_user,
|
||||
managehome => true,
|
||||
home => $pt_user_home,
|
||||
shell => $pt_user_shell,
|
||||
}
|
||||
|
||||
group { $pt_user:
|
||||
ensure => present,
|
||||
name => $pt_user,
|
||||
allowdupe => false,
|
||||
}
|
||||
}
|
||||
|
||||
if ($fqdn == $pt_db_fqdn) and ($pt_manage_db_user == true) {
|
||||
user { $pt_db_user:
|
||||
ensure => present,
|
||||
name => $pt_db_user,
|
||||
allowdupe => false,
|
||||
comment => $pt_db_user_comment,
|
||||
gid => $pt_db_user,
|
||||
managehome => true,
|
||||
home => $pt_db_user_home,
|
||||
shell => $pt_db_user_shell,
|
||||
}
|
||||
|
||||
group { $pt_db_user:
|
||||
ensure => present,
|
||||
name => $pt_db_user,
|
||||
allowdupe => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +1,17 @@
|
||||
## puppet_cd::params.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::params.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages parameters for the puppet_cd module.
|
||||
# @summary Class manages parameters for the confdroid_puppet module.
|
||||
# @param [Boolean] pt_manage_fw whether to manage firewall settings
|
||||
# @param [Boolean] pt_use_puppetdb whether to use puppetdb
|
||||
# @param [String] pt_pm_fqdn the fqdn for the puppetmaster and master
|
||||
# settings are applied. any other fqdn # will be considered a puppet agent.
|
||||
# @param [String] pt_db_fqdn the fqdn for the puppetdb host.
|
||||
# @param [String] pt_puppetdb_fqdn the fqdn for the puppetdb node.
|
||||
# @param [String] pt_pkg_ensure valid: "present", "latest", "v1.2.3"
|
||||
# @param [String] pt_agent_pkg the packages for agents to install
|
||||
# @param [String] pt_server_pkg the server packages to install
|
||||
# @param [Array] pt_db_pkg the packages for puppetdb
|
||||
# @param [String] pt_no_ssl_port non-ssl port number for puppetdb
|
||||
# @param [String] pt_ssl_port ssl port for puppetdb
|
||||
# @param [Boolean] pt_use_ssl_only whether to use ssl only.
|
||||
# @param [Boolean] pt_manage_user whether to manage the puppet user
|
||||
# @param [String] pt_user the puppet user
|
||||
# @param [String] pt_user_comment the user comment
|
||||
# @param [String] pt_user_home the user home
|
||||
# @param [String] pt_user_shell the user shell
|
||||
# @param [Boolean] pt_manage_db_user whether to manage the user for puppetdb
|
||||
# @param [String] pt_db_user the puppetdb user
|
||||
# @param [String] pt_db_user_comment the user comment for puppetdb user
|
||||
# @param [String] pt_db_user_home the user home for the puppetdb user
|
||||
# @param [String] pt_db_user_shell the shell for the puppetdb user
|
||||
# @param [Boolean] pt_use_puppetdb whether to use puppetdb on host
|
||||
# @param [String] pt_puppetdb_pkg the puppetdb packages to install
|
||||
# @param [Array] pt_r10k_pkg the packages for r10k to install
|
||||
# @param [String] pt_environment the environment
|
||||
# @param [Boolean] pt_basemodulepath the base module path
|
||||
# @param [String] pt_logdir the log directory
|
||||
@@ -53,56 +41,46 @@
|
||||
# @param [String] pt_storeconfigs_backend where to store client configs
|
||||
# @param [String] pt_parser which parser version to use
|
||||
# @param [Boolean] pt_cert_revocation whether to check for cert revocations
|
||||
# @param [String] pt_logging_max_file_size max file size for puppetdb logging
|
||||
# @param [String] pt_logging_max_history max logging history
|
||||
# @param [String] pt_logging_total_size total size of logging file
|
||||
# @param [String] pt_com_proc_threads number of processing threads
|
||||
# @param [String] pt_concurrent_writes max concurrent writes
|
||||
# @param [String] pt_db_subname the db name
|
||||
# @param [String] pt_db_username the db username
|
||||
# @param [String] pt_db_password the db password
|
||||
# @param [String] pt_gc_interval garbage collection interval (Java)
|
||||
# @param [String] pt_log_slow_statements number of seconds before an SQL query
|
||||
# is considered "slow."
|
||||
# @param [String] pt_puppetdb_source_lan the source lan for puppetdb clients
|
||||
# @param [Boolean] pt_soft_write_failure allows the PuppetDB-termini to fail
|
||||
# softly if PuppetDB is not accessible for command submission.
|
||||
# @param [String] pt_no_ssl_host ip range for non-ssl hosts
|
||||
# @param [String] pt_ssl_host ip range for SSL hosts
|
||||
# @param [String] pt_ssl_key location of the private key
|
||||
# @param [String] pt_ssl_cert location of the ssl cert
|
||||
# @param [String] pt_ssl_ca_cert location of the ssl ca cert
|
||||
# @param [Boolean] pt_log_access whether to configure log access
|
||||
# @param [String] pt_access_log_config the location of the access log config
|
||||
# @param [Boolean] pt_enable_repl whether to allow puppetdb replication
|
||||
# @param [String] pt_repl_port the replication port
|
||||
# @param [String] pt_repl_host the replication host
|
||||
# @param [Boolean] pt_use_r10k whether to use r10k service
|
||||
# @param [Boolean] pt_use_r10k_webhook whether to use r10k webhook service
|
||||
# @param [String] pt_r10k_remote the remote url for the r10k control repo
|
||||
# @param [Boolean] pt_r10k_prefix the r10k prefix. defaults to false
|
||||
# @param [String] pt_r10k_basedir the base directory for r10k.yaml
|
||||
# @param [Array] pt_r10k_webhook_pkg the packages for the r10k webhook
|
||||
# @param [String] pt_r10k_webhook_port the port for the webhook listener
|
||||
# @param [String] pt_ssl_port the port for the puppetdb ssl port
|
||||
# @param [Boolean] pt_soft_write_failure whether to allow soft_write_failure
|
||||
# @param [String] pt_db_subname the url for the database connection
|
||||
# @param [String] pt_db_username the username for the database connection
|
||||
# @param [String] pt_db_password the password for the database connection
|
||||
# @param [String] pt_gc_interval How often (in minutes) to compact the database
|
||||
# @param [String] pt_http_port Port to listen on for clear-text HTTP.
|
||||
# @param [String] pt_https_port Port to listen on for HTTPs connections.
|
||||
# @param [String] pt_ssl_host IP address to listen on for HTTPS connections
|
||||
# @param [Boolean] pt_repl_on toggle the remote repl true false
|
||||
# @param [String] pt_repl_port What port the REPL should listen on
|
||||
# @param [String] pt_repl_host IP address to listen on
|
||||
# @param [Boolean] pt_enable_tls whether to use tls encryption for the backend
|
||||
# @param [String] pt_pptdb_ca_crt placeholder for the ca.crt
|
||||
# @param [String] pt_pptdb_server_crt placeholder for the server.crt
|
||||
# @param [String] pt_pptdb_server_key placeholder for the server.crt
|
||||
# @param [String] pt_pptdb_log_max_age the max age for puppetdb logs in days
|
||||
###############################################################################
|
||||
class puppet_cd::params (
|
||||
class confdroid_puppet::params (
|
||||
|
||||
Boolean $pt_manage_fw = true,
|
||||
String $pt_pm_fqdn = 'puppetmaster.example.net',
|
||||
String $pt_db_fqdn = 'puppetdb.example.net',
|
||||
String $pt_puppetdb_fqdn = 'puppetdb.example.net',
|
||||
Boolean $pt_use_puppetdb = false,
|
||||
|
||||
# installation
|
||||
String $pt_pkg_ensure = 'present',
|
||||
String $pt_agent_pkg = 'puppet-agent',
|
||||
String $pt_server_pkg = 'puppetserver',
|
||||
Array $pt_db_pkg = ['puppetdb','puppetdb-termini'],
|
||||
Array $pt_puppetdb_pkg = ['puppetdb-termini', 'puppetdb'],
|
||||
Array $pt_r10k_pkg = ['ruby','ruby-devel','rubygems','gcc','make'],
|
||||
Array $pt_r10k_webhook_pkg = ['webrick', 'r10k_gitlab_webhook'],
|
||||
|
||||
# user settings
|
||||
## puppet user
|
||||
Boolean $pt_manage_user = true,
|
||||
String $pt_user = 'puppet',
|
||||
String $pt_user_comment = 'puppetserver daemon',
|
||||
String $pt_user_home = '/opt/puppetlabs/server/data/puppetserver',
|
||||
String $pt_user_shell = '/sbin/nologin',
|
||||
## puppetdb user
|
||||
Boolean $pt_manage_db_user = true,
|
||||
String $pt_db_user = 'puppetdb',
|
||||
String $pt_db_user_comment = 'PuppetDB daemon',
|
||||
String $pt_db_user_home = '/opt/puppetlabs/server/data/puppetdb',
|
||||
String $pt_db_user_shell = '/sbin/nologin',
|
||||
# templates
|
||||
## puppet
|
||||
String $pt_environment = 'production',
|
||||
@@ -132,36 +110,43 @@ class puppet_cd::params (
|
||||
String $pt_storeconfigs_backend = 'puppetdb',
|
||||
String $pt_parser = 'current',
|
||||
Boolean $pt_cert_revocation = true,
|
||||
## puppetdb
|
||||
Boolean $pt_use_puppetdb = false,
|
||||
String $pt_logging_max_file_size = '200MB',
|
||||
String $pt_logging_max_history = '90',
|
||||
String $pt_logging_total_size = '1GB',
|
||||
String $pt_com_proc_threads = '4',
|
||||
String $pt_concurrent_writes = '4',
|
||||
|
||||
# puppetdb
|
||||
String $pt_ssl_port = '8081',
|
||||
Boolean $pt_soft_write_failure = false,
|
||||
String $pt_db_subname = '//localhost:5432/puppetdb',
|
||||
String $pt_db_username = 'foobar',
|
||||
String $pt_db_password = 'foobar',
|
||||
String $pt_gc_interval = '60',
|
||||
String $pt_log_slow_statements = '10',
|
||||
String $pt_no_ssl_port = '8080',
|
||||
String $pt_ssl_port = '8081',
|
||||
Boolean $pt_use_ssl_only = true,
|
||||
String $pt_puppetdb_source_lan = '0.0.0.0/0',
|
||||
Boolean $pt_soft_write_failure = false,
|
||||
String $pt_no_ssl_host = '0.0.0.0',
|
||||
Boolean $pt_enable_tls = false,
|
||||
String $pt_pptdb_ca_crt = 'Changeme',
|
||||
String $pt_pptdb_server_crt = 'Changeme',
|
||||
String $pt_pptdb_server_key = 'Changeme',
|
||||
String $pt_pptdb_log_max_age = '30',
|
||||
|
||||
## jetty
|
||||
String $pt_http_port = '8080',
|
||||
String $pt_https_port = '8081',
|
||||
String $pt_ssl_host = '0.0.0.0',
|
||||
String $pt_ssl_key = '/etc/puppetlabs/puppetdb/ssl/private.pem',
|
||||
String $pt_ssl_cert = '/etc/puppetlabs/puppetdb/ssl/public.pem',
|
||||
String $pt_ssl_ca_cert = '/etc/puppetlabs/puppetdb/ssl/ca.pem',
|
||||
Boolean $pt_log_access = false,
|
||||
String $pt_access_log_config = '/etc/puppetlabs/puppetdb/request-logging.xml',
|
||||
Boolean $pt_enable_repl = false,
|
||||
## repl
|
||||
Boolean $pt_repl_on = false,
|
||||
String $pt_repl_port = '8082',
|
||||
String $pt_repl_host = '127.0.0.1',
|
||||
|
||||
# r10k
|
||||
Boolean $pt_use_r10k = false,
|
||||
Boolean $pt_use_r10k_webhook = false,
|
||||
String $pt_r10k_remote = 'git@gitlab.example.net/repo.git',
|
||||
Boolean $pt_r10k_prefix = false,
|
||||
String $pt_r10k_basedir = '/etc/puppetlabs/code/environments',
|
||||
String $pt_r10k_webhook_port = '8085',
|
||||
|
||||
) {
|
||||
# facts
|
||||
$fqdn = $facts['networking']['fqdn']
|
||||
$domain = $facts['networking']['domain']
|
||||
$os_name = $facts['os']['name']
|
||||
$os_release = $facts['os']['release']['major']
|
||||
|
||||
# directories
|
||||
## puppet
|
||||
@@ -175,44 +160,63 @@ class puppet_cd::params (
|
||||
$pt_rundir_master = '/var/run/puppetlabs/puppetserver'
|
||||
$pt_vardir = '/opt/puppetlabs/puppet/cache'
|
||||
$pt_vardir_master = '/opt/puppetlabs/server/data/puppetserver'
|
||||
## r10k
|
||||
$pt_r10k_dir = "${pt_main_dir}/r10k"
|
||||
$pt_r10k_webhook_dir = '/etc/r10k-webhook'
|
||||
## puppetdb
|
||||
$pt_puppetdb_main = '/etc/puppetlabs/puppetdb'
|
||||
$pt_puppetdb_conf_d = "${pt_puppetdb_main}/conf.d"
|
||||
$pt_puppetdb_ssl = "${pt_puppetdb_main}/ssl"
|
||||
$pt_puppetdb_log = '/var/log/puppetlabs/puppetdb'
|
||||
$pt_puppetdb_var_dir = '/opt/puppetlabs/server/data/puppetdb'
|
||||
$pt_puppetdb_dir = '/etc/puppetlabs/puppetdb'
|
||||
$pt_puppetdb_conf_dir = "${pt_puppetdb_dir}/conf.d"
|
||||
$pt_pptdb_ssldir = "${pt_puppetdb_dir}/ssl"
|
||||
|
||||
# files
|
||||
## puppet
|
||||
$pt_puppet_conf_file = "${pt_puppetdir}/puppet.conf"
|
||||
$pt_puppet_conf_erb = 'puppet_cd/puppet.conf.erb'
|
||||
$pt_agent_conf_erb = 'puppet_cd/agent.conf.erb'
|
||||
$pt_puppet_conf_erb = 'confdroid_puppet/puppet.conf.erb'
|
||||
$pt_hiera_config = "${pt_puppetdir}/hiera.yaml"
|
||||
## puppetdb
|
||||
$pt_bootstrap_conf = "${pt_puppetdb_main}/bootstrap.cfg"
|
||||
$pt_bootstrap_erb = 'cd_puppet/puppetdb/bootstrap.cfg.erb'
|
||||
$pt_puppetdb_access_log = "${pt_puppetdb_log}/puppetdb-access"
|
||||
$pt_request_logging_conf = "${pt_puppetdb_main}/request-logging.xml"
|
||||
$pt_request_logging_erb = 'cd_puppet/puppetdb/request_logging.xml.erb'
|
||||
$pt_logback_conf = "${pt_puppetdb_main}/logback.xml"
|
||||
$pt_logback_erb = 'cd_puppet/puppetdb/logback.xml.erb'
|
||||
$pt_puppetdb_config_ini = "${pt_puppetdb_conf_d}/config.ini"
|
||||
$pt_puppetdb_config_erb = 'cd_puppet/puppetdb/config.ini.erb'
|
||||
$pt_puppetdb_database_ini = "${pt_puppetdb_conf_d}/database.ini"
|
||||
$pt_puppetdb_database_erb = 'cd_puppet/puppetdb/database.ini.erb'
|
||||
$pt_puppetdb_jetty_ini = "${pt_puppetdb_conf_d}/jetty.ini"
|
||||
$pt_puppetdb_jetty_erb = 'cd_puppet/puppetdb/jetty.ini.erb'
|
||||
$pt_puppetdb_conf_file = "${pt_puppetdir}/puppetdb.conf"
|
||||
$pt_puppetdb_conf_erb = 'cd_puppet/puppetdb/puppetdb.conf.erb'
|
||||
$pt_puppetdb_repl_ini = "${pt_puppetdb_conf_d}/repl.ini"
|
||||
$pt_puppetdb_repl_erb = 'cd_puppet/puppetdb/repl.ini.erb'
|
||||
$pt_puppetdb_conf_erb = 'confdroid_puppet/puppetdb/puppetdb.conf.erb'
|
||||
$pt_routes_file = "${pt_puppetdir}/routes.yaml"
|
||||
$pt_routes_erb = 'confdroid_puppet/puppetdb/routes.yaml.erb'
|
||||
$pt_node_rb_file = "${pt_puppetdir}/node.rb"
|
||||
$pt_node_rb_erb = 'confdroid_puppet/puppetdb/node.rb.erb'
|
||||
## r10k
|
||||
$pt_r10k_file = "${pt_r10k_dir}/r10k.yaml"
|
||||
$pt_r10k_erb = 'confdroid_puppet/r10k/r10k.yaml.erb'
|
||||
$pt_webhook_link = 'ln -sf /usr/local/share/gems/gems/r10k_gitlab_webhook-0.1.3/bin/r10k_gitlab_webhook /usr/bin/'
|
||||
$pt_webhook_service_file = '/etc/systemd/system/r10k_gitlab_webhook.service'
|
||||
$pt_webhook_service_erb = 'confdroid_puppet/r10k/r10k_webhook_service.erb'
|
||||
## puppetdb
|
||||
$pt_bootstrap_conf_file = "${pt_puppetdb_dir}/bootstrap.cfg"
|
||||
$pt_bootstrap_conf_erb = 'confdroid_puppet/puppetdb/bootstrap.cfg.erb'
|
||||
$pt_logback_conf_file = "${pt_puppetdb_dir}/logback.xml"
|
||||
$pt_logback_conf_erb = 'confdroid_puppet/puppetdb/logback.xml.erb'
|
||||
$pt_logging_conf_file = "${pt_puppetdb_dir}/request-logging.xml"
|
||||
$pt_logging_conf_erb = 'confdroid_puppet/puppetdb/request_logging.xml.erb'
|
||||
$pt_auth_conf_file = "${pt_puppetdb_conf_dir}/auth.conf"
|
||||
$pt_auth_conf_erb = 'confdroid_puppet/puppetdb/auth.conf.erb'
|
||||
$pt_config_ini_file = "${pt_puppetdb_conf_dir}/config.ini"
|
||||
$pt_config_ini_erb = 'confdroid_puppet/puppetdb/config.ini.erb'
|
||||
$pt_db_ini_file = "${pt_puppetdb_conf_dir}/database.ini"
|
||||
$pt_db_ini_erb = 'confdroid_puppet/puppetdb/database.ini.erb'
|
||||
$pt_jetty_ini_file = "${pt_puppetdb_conf_dir}/jetty.ini"
|
||||
$pt_jetty_ini_erb = 'confdroid_puppet/puppetdb/jetty.ini.erb'
|
||||
$pt_repl_ini_file = "${pt_puppetdb_conf_dir}/repl.ini"
|
||||
$pt_repl_ini_erb = 'confdroid_puppet/puppetdb/repl.ini.erb'
|
||||
$pt_service_conf_file = '/usr/lib/systemd/system/puppetdb.service'
|
||||
$pt_service_conf_erb = 'confdroid_puppet/puppetdb/service.conf.erb'
|
||||
$pt_ca_crt_file = "${pt_pptdb_ssldir}/ca.crt"
|
||||
$pt_ca_crt_erb = 'confdroid_puppet/puppetdb/ca.crt.erb'
|
||||
$pt_server_crt_file = "${pt_pptdb_ssldir}/server.crt"
|
||||
$pt_server_crt_erb = 'confdroid_puppet/puppetdb/server.crt.erb'
|
||||
$pt_server_key_file = "${pt_pptdb_ssldir}/server.key"
|
||||
$pt_server_key_erb = 'confdroid_puppet/puppetdb/server.key.erb'
|
||||
|
||||
# service
|
||||
$pt_server_service = 'puppetserver'
|
||||
$pt_agent_service = 'puppet'
|
||||
$pt_r10k_webhook_service = 'r10k_gitlab_webhook'
|
||||
$pt_db_service = 'puppetdb'
|
||||
|
||||
#
|
||||
# includes must be last
|
||||
include puppet_cd::main::config
|
||||
include confdroid_puppet::main::config
|
||||
}
|
||||
|
||||
@@ -1,63 +1,33 @@
|
||||
## puppet_cd::puppetdb::dirs.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::puppetdb::dirs.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages puppetdb directories
|
||||
# @summary Class manages directories for the puppetdb section
|
||||
###############################################################################
|
||||
class puppet_cd::puppetdb::dirs (
|
||||
class confdroid_puppet::puppetdb::dirs (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
if ($fqdn == $pt_puppetdb_server) and ($pt_use_puppetdb == true) {
|
||||
require puppet_cd::main::install
|
||||
) inherits confdroid_puppet::params {
|
||||
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
|
||||
require confdroid_puppet::main::install
|
||||
|
||||
# main directory
|
||||
file { $pt_puppetdb_main:
|
||||
file { $pt_puppetdb_dir:
|
||||
ensure => directory,
|
||||
path => $pt_puppetdb_main,
|
||||
owner => $pt_puppetdb_user,
|
||||
group => $pt_puppetdb_user,
|
||||
owner => 'puppetdb',
|
||||
group => 'puppetdb',
|
||||
mode => '0750',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
|
||||
# conf.d directory
|
||||
file { $pt_puppetdb_conf_d:
|
||||
file { $pt_puppetdb_conf_dir:
|
||||
ensure => directory,
|
||||
path => $pt_puppetdb_conf_d,
|
||||
owner => $pt_puppetdb_user,
|
||||
group => $pt_puppetdb_user,
|
||||
mode => '0750',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
|
||||
# ssl directory
|
||||
file { $pt_puppetdb_ssl:
|
||||
ensure => directory,
|
||||
path => $pt_puppetdb_ssl,
|
||||
owner => $pt_puppetdb_user,
|
||||
group => $pt_puppetdb_user,
|
||||
mode => '0750',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
|
||||
# log dir
|
||||
file { $pt_puppetdb_log:
|
||||
ensure => directory,
|
||||
path => $pt_puppetdb_log,
|
||||
owner => $pt_puppetdb_user,
|
||||
group => $pt_puppetdb_user,
|
||||
mode => '0700',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => var_log_t,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
## puppet_cd::puppetdb::files.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::puppetdb::files.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages puppetdb files
|
||||
# @summary Class manages config files for the puppetdb section
|
||||
###############################################################################
|
||||
class puppet_cd::puppetdb::files (
|
||||
class confdroid_puppet::puppetdb::files (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
if ($fqdn == $pt_puppetdb_server) and ($pt_use_puppetdb == true) {
|
||||
require puppet_cd::puppetdb::dirs
|
||||
) inherits confdroid_puppet::params {
|
||||
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
|
||||
require confdroid_puppet::puppetdb::dirs
|
||||
|
||||
# bootstrap.cfg
|
||||
file { $pt_bootstrap_conf:
|
||||
file { $pt_bootstrap_conf_file:
|
||||
ensure => file,
|
||||
path => $pt_bootstrap_conf,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
@@ -20,29 +19,12 @@ class puppet_cd::puppetdb::files (
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_bootstrap_erb),
|
||||
notify => Service[$pt_puppetdb],
|
||||
content => template($pt_bootstrap_conf_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
|
||||
# requestlogging.xml
|
||||
file { $pt_request_logging_conf:
|
||||
ensure => file,
|
||||
path => $pt_request_logging_conf,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_request_logging_erb),
|
||||
notify => Service[$pt_puppetdb],
|
||||
}
|
||||
|
||||
# logback.xml
|
||||
file { $pt_logback_conf:
|
||||
file { $pt_logback_conf_file:
|
||||
ensure => file,
|
||||
path => $pt_logback_conf,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
@@ -50,68 +32,142 @@ class puppet_cd::puppetdb::files (
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_logback_erb),
|
||||
notify => Service[$pt_puppetdb],
|
||||
content => template($pt_logback_conf_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
# request-logging.xml
|
||||
file { $pt_logging_conf_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_logging_conf_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
# service config
|
||||
file { $pt_service_conf_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => systemd_unit_file_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_service_conf_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
# conf.d files
|
||||
## auth.conf
|
||||
file { $pt_auth_conf_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_auth_conf_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
|
||||
# config.ini
|
||||
file { $pt_puppetdb_config_ini:
|
||||
file { $pt_config_ini_file:
|
||||
ensure => file,
|
||||
path => $pt_puppetdb_config_ini,
|
||||
owner => $pt_puppetdb_user,
|
||||
group => $pt_puppetdb_user,
|
||||
mode => '0640',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_puppetdb_config_erb),
|
||||
notify => Service[$pt_puppetdb],
|
||||
content => template($pt_config_ini_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
|
||||
# database.ini
|
||||
file { $pt_puppetdb_database_ini:
|
||||
file { $pt_db_ini_file:
|
||||
ensure => file,
|
||||
path => $pt_puppetdb_database_ini,
|
||||
owner => $pt_puppetdb_user,
|
||||
group => $pt_puppetdb_user,
|
||||
mode => '0640',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_puppetdb_database_erb),
|
||||
notify => Service[$pt_puppetdb],
|
||||
content => template($pt_db_ini_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
|
||||
# jetty.ini
|
||||
file { $pt_puppetdb_jetty_ini :
|
||||
file { $pt_jetty_ini_file:
|
||||
ensure => file,
|
||||
path => $pt_puppetdb_jetty_ini ,
|
||||
owner => $pt_puppetdb_user,
|
||||
group => $pt_puppetdb_user,
|
||||
mode => '0640',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_puppetdb_jetty_erb),
|
||||
notify => Service[$pt_puppetdb],
|
||||
content => template($pt_jetty_ini_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
|
||||
# repl.ini
|
||||
file { $pt_puppetdb_repl_ini:
|
||||
file { $pt_repl_ini_file:
|
||||
ensure => file,
|
||||
path => $pt_puppetdb_repl_ini,
|
||||
owner => $pt_puppetdb_user,
|
||||
group => $pt_puppetdb_user,
|
||||
mode => '0640',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_puppetdb_repl_erb),
|
||||
notify => Service[$pt_puppetdb],
|
||||
content => template($pt_repl_ini_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
if $pt_enable_tls == true {
|
||||
# create tls certs
|
||||
## ca.crt
|
||||
file { $pt_ca_crt_file:
|
||||
ensure => file,
|
||||
owner => 'puppetdb',
|
||||
group => 'puppetdb',
|
||||
mode => '0440',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_ca_crt_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
## server.crt
|
||||
file { $pt_server_crt_file:
|
||||
ensure => file,
|
||||
owner => 'puppetdb',
|
||||
group => 'puppetdb',
|
||||
mode => '0440',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_server_crt_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
## server.key
|
||||
file { $pt_server_key_file:
|
||||
ensure => file,
|
||||
owner => 'puppetdb',
|
||||
group => 'puppetdb',
|
||||
mode => '0440',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($pt_server_key_erb),
|
||||
notify => Service[$pt_db_service],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
## puppet_cd::puppetdb::service.pp
|
||||
# Module name: puppet_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages puppetdb service
|
||||
###############################################################################
|
||||
class puppet_cd::puppetdb::service (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
if ($fqdn == $pt_puppetdb_server) and ($pt_use_puppetdb == true) {
|
||||
require puppet_cd::puppetdb::files
|
||||
|
||||
service { $pt_puppetdb:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
91
manifests/r10k/install.pp
Normal file
91
manifests/r10k/install.pp
Normal file
@@ -0,0 +1,91 @@
|
||||
## confdroid_puppet::r10k::install.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages r10k installation for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class confdroid_puppet::r10k::install (
|
||||
|
||||
) inherits confdroid_puppet::params {
|
||||
if ($pt_pm_fqdn == $fqdn) and ($pt_use_r10k == true) {
|
||||
# enable CRB
|
||||
exec { 'enable_crb':
|
||||
command => 'dnf config-manager --set-enabled crb',
|
||||
unless => 'dnf repolist --disabled | grep -qE "crb|CodeReady"',
|
||||
path => ['/usr/bin', '/bin'],
|
||||
}
|
||||
|
||||
# install required packages
|
||||
package { $pt_r10k_pkg:
|
||||
ensure => $pt_pkg_ensure,
|
||||
before => Package['r10k'],
|
||||
require => Exec['enable_crb'],
|
||||
}
|
||||
|
||||
# install r10k via gem
|
||||
package { 'r10k':
|
||||
ensure => $pt_pkg_ensure,
|
||||
provider => gem,
|
||||
require => Package[$pt_r10k_pkg],
|
||||
}
|
||||
|
||||
# create r10k dir
|
||||
file { 'r10k_dir':
|
||||
ensure => directory,
|
||||
path => $pt_r10k_dir,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => unconfined_u,
|
||||
}
|
||||
|
||||
# configure r10k.yaml
|
||||
file { $pt_r10k_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => unconfined_u,
|
||||
require => File['r10k_dir'],
|
||||
content => template($pt_r10k_erb),
|
||||
}
|
||||
|
||||
if $pt_use_r10k_webhook == true {
|
||||
package { $pt_r10k_webhook_pkg:
|
||||
ensure => present,
|
||||
provider => gem,
|
||||
require => Package[$pt_r10k_pkg],
|
||||
}
|
||||
|
||||
exec { 'create symlink':
|
||||
command => $pt_webhook_link,
|
||||
creates => '/usr/bin/r10k_gitlab_webhook',
|
||||
path => ['/bin', '/usr/bin'],
|
||||
require => Package[$pt_r10k_webhook_pkg],
|
||||
}
|
||||
|
||||
file { $pt_webhook_service_file:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => puppet_etc_t,
|
||||
seluser => unconfined_u,
|
||||
content => template($pt_webhook_service_erb),
|
||||
notify => [Service[$pt_r10k_webhook_service],Exec['systemctl-daemon-reload']],
|
||||
}
|
||||
|
||||
exec { 'systemctl-daemon-reload':
|
||||
command => '/bin/systemctl daemon-reload',
|
||||
refreshonly => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
## puppet_cd::server::service.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::server::service.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages the puppet server service for the puppet_cd module.
|
||||
# @summary Class manages the puppet server service for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::server::service (
|
||||
class confdroid_puppet::server::service (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
require puppet_cd::main::files
|
||||
) inherits confdroid_puppet::params {
|
||||
require confdroid_puppet::main::files
|
||||
|
||||
# manage agent service on all nodes
|
||||
service { $pt_agent_service:
|
||||
@@ -18,8 +18,7 @@ class puppet_cd::server::service (
|
||||
|
||||
# manage puppet server service
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
require puppet_cd::firewall::iptables
|
||||
require puppet_cd::main::user
|
||||
require confdroid_puppet::firewall::iptables
|
||||
|
||||
service { $pt_server_service:
|
||||
ensure => running,
|
||||
@@ -27,11 +26,22 @@ class puppet_cd::server::service (
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
}
|
||||
# manage webhook service
|
||||
if $pt_use_r10k_webhook == true {
|
||||
require confdroid_puppet::r10k::install
|
||||
|
||||
service { $pt_r10k_webhook_service:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# manage puppetdb service
|
||||
if $fqdn == $pt_db_fqdn {
|
||||
require puppet_cd::firewall::iptables
|
||||
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
|
||||
require confdroid_puppet::firewall::iptables
|
||||
require confdroid_puppet::puppetdb::files
|
||||
|
||||
service { $pt_db_service:
|
||||
ensure => running,
|
||||
|
||||
@@ -46,10 +46,10 @@
|
||||
ssldir = <%= @pt_ssldir %>
|
||||
strict_variables = <%= @pt_strict_variables %>
|
||||
vardir = <%= @pt_vardir_master %>
|
||||
<% if @pt_use_puppetdb != true %>
|
||||
<% if @pt_use_puppetdb != true -%>
|
||||
storeconfigs = false
|
||||
<% end -%>
|
||||
<% if @pt_use_puppetdb == true %>
|
||||
<% if @pt_use_puppetdb == true -%>
|
||||
storeconfigs = true
|
||||
storeconfigs_backend = <%= @pt_storeconfigs_backend %>
|
||||
<% end end -%>
|
||||
|
||||
50
templates/puppetdb/auth.conf.erb
Normal file
50
templates/puppetdb/auth.conf.erb
Normal file
@@ -0,0 +1,50 @@
|
||||
authorization: {
|
||||
version: 1
|
||||
rules: [
|
||||
{
|
||||
# Allow unauthenticated access to the status service endpoint
|
||||
match-request: {
|
||||
path: "/status/v1/services"
|
||||
type: path
|
||||
method: get
|
||||
}
|
||||
allow-unauthenticated: true
|
||||
sort-order: 500
|
||||
name: "puppetlabs status service - full"
|
||||
},
|
||||
{
|
||||
match-request: {
|
||||
path: "/status/v1/simple"
|
||||
type: path
|
||||
method: get
|
||||
}
|
||||
allow-unauthenticated: true
|
||||
sort-order: 500
|
||||
name: "puppetlabs status service - simple"
|
||||
},
|
||||
{
|
||||
# Allow nodes to access the metrics service
|
||||
# for puppetdb, the metrics service is the only
|
||||
# service using the authentication service
|
||||
match-request: {
|
||||
path: "/metrics"
|
||||
type: path
|
||||
method: [get, post]
|
||||
}
|
||||
allow: "*"
|
||||
sort-order: 500
|
||||
name: "puppetlabs puppetdb metrics"
|
||||
},
|
||||
{
|
||||
# Deny everything else. This ACL is not strictly
|
||||
# necessary, but illustrates the default policy
|
||||
match-request: {
|
||||
path: "/"
|
||||
type: path
|
||||
}
|
||||
deny: "*"
|
||||
sort-order: 999
|
||||
name: "puppetlabs deny all"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
###############################################################################
|
||||
########## bootstrap.cfg managed by puppet agent ##########
|
||||
######### File created by Puppet - manual changes will be overwritten #########
|
||||
###############################################################################
|
||||
|
||||
# This file is used by the application framework (trapperkeeper) to
|
||||
@@ -8,13 +8,15 @@
|
||||
# https://github.com/puppetlabs/trapperkeeper/wiki/Bootstrapping
|
||||
|
||||
# Web Server
|
||||
puppetlabs.trapperkeeper.services.webserver.jetty9-service/jetty9-service
|
||||
puppetlabs.trapperkeeper.services.webserver.jetty10-service/jetty10-service
|
||||
|
||||
# Webrouting
|
||||
puppetlabs.trapperkeeper.services.webrouting.webrouting-service/webrouting-service
|
||||
|
||||
# TK status
|
||||
# TK metrics - the authorization service is currently only used by the metrics service
|
||||
puppetlabs.trapperkeeper.services.authorization.authorization-service/authorization-service
|
||||
puppetlabs.trapperkeeper.services.metrics.metrics-service/metrics-webservice
|
||||
# TK status
|
||||
puppetlabs.trapperkeeper.services.status.status-service/status-service
|
||||
puppetlabs.trapperkeeper.services.scheduler.scheduler-service/scheduler-service
|
||||
|
||||
@@ -28,5 +30,5 @@ puppetlabs.puppetdb.config/config-service
|
||||
# NREPL
|
||||
puppetlabs.trapperkeeper.services.nrepl.nrepl-service/nrepl-service
|
||||
|
||||
# Dashboard redirect: remove to disable
|
||||
# Dashboard redirect for "/" (not "/pdb"): remove to disable
|
||||
puppetlabs.puppetdb.dashboard/dashboard-redirect-service
|
||||
1
templates/puppetdb/ca.crt.erb
Normal file
1
templates/puppetdb/ca.crt.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= @pt_pptdb_ca_crt %>
|
||||
@@ -1,11 +1,20 @@
|
||||
###############################################################################
|
||||
########## config.ini managed by puppet agent ##########
|
||||
######### File created by Puppet - manual changes will be overwritten #########
|
||||
###############################################################################
|
||||
|
||||
# See README.md for more thorough explanations of each section and
|
||||
# option.
|
||||
|
||||
[global]
|
||||
vardir = <%= @pt_puppetdb_var_dir %>
|
||||
logging-config = <%= @pt_logback_conf %>
|
||||
# Store mq/db data in a custom directory
|
||||
vardir = /opt/puppetlabs/server/data/puppetdb
|
||||
|
||||
# Use an external logback config file
|
||||
logging-config = /etc/puppetlabs/puppetdb/logback.xml
|
||||
|
||||
[command-processing]
|
||||
threads = <%= @pt_com_proc_threads %>
|
||||
concurrent-writes = <%= @pt_concurrent_writes %>
|
||||
# How many command-processing threads to use, defaults to (CPUs / 2)
|
||||
# threads = 4
|
||||
|
||||
# How many threads can write to disk at once, defaults to min(CPUs / 2, 4)
|
||||
# concurrent-writes = 4
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
###############################################################################
|
||||
########## database.ini managed by puppet agent ##########
|
||||
######### File created by Puppet - manual changes will be overwritten #########
|
||||
###############################################################################
|
||||
|
||||
[database]
|
||||
|
||||
# The database address, i.e. //HOST:PORT/DATABASE_NAME
|
||||
subname = <%= @pt_db_subname %>
|
||||
|
||||
# Connect as a specific user
|
||||
username = <%= @pt_db_username %>
|
||||
|
||||
# Use a specific password
|
||||
password = <%= @pt_db_password %>
|
||||
|
||||
# How often (in minutes) to compact the database
|
||||
gc-interval = <%= @pt_gc_interval %>
|
||||
|
||||
@@ -1,31 +1,37 @@
|
||||
###############################################################################
|
||||
########## jetty.ini managed by puppet agent ##########
|
||||
######### File created by Puppet - manual changes will be overwritten #########
|
||||
###############################################################################
|
||||
|
||||
[jetty]
|
||||
<% if @pt_use_ssl_only != true %>
|
||||
host = <%= @pt_no_ssl_host %>
|
||||
port = <%= @pt_no_ssl_port %>
|
||||
# IP address or hostname to listen for clear-text HTTP. To avoid resolution
|
||||
# issues, IP addresses are recommended over hostnames.
|
||||
# Default is `localhost`.
|
||||
# host = <host>
|
||||
|
||||
# ssl
|
||||
ssl-host = <%= @pt_ssl_host %>
|
||||
ssl-port = <%= @pt_ssl_port %>
|
||||
ssl-key = <%= @pt_ssl_key %>
|
||||
ssl-cert = <%= @pt_ssl_cert %>
|
||||
ssl-ca-cert = <%= @pt_ssl_ca_cert %>
|
||||
# Port to listen on for clear-text HTTP.
|
||||
port = <%= @pt_http_port %>
|
||||
|
||||
<% if @pt_log_access == true %>
|
||||
access-log-config = <%= @pt_access_log_config %>
|
||||
<% end end %>
|
||||
# The following are SSL specific settings. They can be configured
|
||||
# automatically with the tool `puppetdb ssl-setup`, which is normally
|
||||
# ran during package installation.
|
||||
|
||||
# IP address to listen on for HTTPS connections. Hostnames can also be used
|
||||
# but are not recommended to avoid DNS resolution issues. To listen on all
|
||||
# interfaces, use `0.0.0.0`.
|
||||
ssl-host = 0.0.0.0
|
||||
|
||||
<% if @pt_use_ssl_only == true %>
|
||||
ssl-host = <%= @pt_ssl_host %>
|
||||
ssl-port = <%= @pt_ssl_port %>
|
||||
ssl-key = <%= @pt_ssl_key %>
|
||||
ssl-cert = <%= @pt_ssl_cert %>
|
||||
ssl-ca-cert = <%= @pt_ssl_ca_cert %>
|
||||
# The port to listen on for HTTPS connections
|
||||
ssl-port = <%= @pt_https_port %>
|
||||
|
||||
<% if @pt_log_access == true %>
|
||||
access-log-config = <%= @pt_access_log_config %>
|
||||
<% end end %>
|
||||
# Private key path
|
||||
ssl-key = /etc/puppetlabs/puppetdb/ssl/private.pem
|
||||
|
||||
# Public certificate path
|
||||
ssl-cert = /etc/puppetlabs/puppetdb/ssl/public.pem
|
||||
|
||||
# Certificate authority path
|
||||
ssl-ca-cert = /etc/puppetlabs/puppetdb/ssl/ca.pem
|
||||
|
||||
# Access logging configuration path. To turn off access logging
|
||||
# comment out the line with `access-log-config=...`
|
||||
access-log-config = /etc/puppetlabs/puppetdb/request-logging.xml
|
||||
|
||||
17
templates/puppetdb/logback.xml.erb
Executable file → Normal file
17
templates/puppetdb/logback.xml.erb
Executable file → Normal file
@@ -1,7 +1,7 @@
|
||||
<configuration scan="true">
|
||||
<configuration scan="true" scanPeriod="60 seconds">
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d %-5p [%c{2}] %m%n</pattern>
|
||||
<pattern>%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX} %-5p [%c{2}] %m%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
@@ -16,20 +16,13 @@
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d %-5p [%c{2}] %m%n</pattern>
|
||||
<pattern>%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX} %-5p [%c{2}] %m%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- Suppress internal ActiveMQ logging -->
|
||||
<logger name="org.apache.activemq" level="warn"/>
|
||||
|
||||
<!-- Suppress internal Spring Framework logging -->
|
||||
<!-- Supress internal Spring Framework logging -->
|
||||
<logger name="org.springframework.jms.connection" level="warn"/>
|
||||
|
||||
<!-- Lower the log level for ActiveMQ KahaDB MessageDatabase -->
|
||||
<logger name="org.apache.activemq.store.kahadb.MessageDatabase"
|
||||
level="info"/>
|
||||
|
||||
<appender name="STATUS" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>/var/log/puppetlabs/puppetdb/puppetdb-status.log</file>
|
||||
<append>true</append>
|
||||
@@ -38,7 +31,7 @@
|
||||
<fileNamePattern>/var/log/puppetlabs/puppetdb/puppetdb-status-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<maxHistory>90</maxHistory>
|
||||
<maxHistory><%= @pt_pptdb_log_max_age %></maxHistory>
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
|
||||
463
templates/puppetdb/node.rb.erb
Normal file
463
templates/puppetdb/node.rb.erb
Normal file
@@ -0,0 +1,463 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# Script usually acts as an ENC for a single host, with the certname supplied as argument
|
||||
# if 'facts' is true, the YAML facts for the host are uploaded
|
||||
# ENC output is printed and cached
|
||||
#
|
||||
# If --push-facts is given as the only arg, it uploads facts for all hosts and then exits.
|
||||
# Useful in scenarios where the ENC isn't used.
|
||||
|
||||
require 'rbconfig'
|
||||
require 'yaml'
|
||||
|
||||
if RbConfig::CONFIG['host_os'] =~ /freebsd|dragonfly/i
|
||||
$settings_file ||= '/usr/local/etc/puppet/foreman.yaml'
|
||||
else
|
||||
$settings_file ||= File.exist?('/etc/puppetlabs/puppet/foreman.yaml') ? '/etc/puppetlabs/puppet/foreman.yaml' : '/etc/puppet/foreman.yaml'
|
||||
end
|
||||
|
||||
SETTINGS = YAML.load_file($settings_file)
|
||||
|
||||
# Default external encoding
|
||||
if defined?(Encoding)
|
||||
Encoding.default_external = Encoding::UTF_8
|
||||
end
|
||||
|
||||
def url
|
||||
SETTINGS[:url] || raise("Must provide URL in #{$settings_file}")
|
||||
end
|
||||
|
||||
def puppetdir
|
||||
SETTINGS[:puppetdir] || raise("Must provide puppet base directory in #{$settings_file}")
|
||||
end
|
||||
|
||||
def puppetuser
|
||||
SETTINGS[:puppetuser] || 'puppet'
|
||||
end
|
||||
|
||||
def fact_extension
|
||||
SETTINGS[:fact_extension] || 'yaml'
|
||||
end
|
||||
|
||||
def fact_directory
|
||||
data_dir = fact_extension == 'yaml' ? 'yaml' : 'server_data'
|
||||
File.join(puppetdir, data_dir, 'facts')
|
||||
end
|
||||
|
||||
def fact_file(certname)
|
||||
File.join(fact_directory, "#{certname}.#{fact_extension}")
|
||||
end
|
||||
|
||||
def fact_files
|
||||
Dir[File.join(fact_directory, "*.#{fact_extension}")]
|
||||
end
|
||||
|
||||
def certname_from_filename(filename)
|
||||
File.basename(filename, ".#{fact_extension}")
|
||||
end
|
||||
|
||||
def stat_file(certname)
|
||||
FileUtils.mkdir_p "#{puppetdir}/yaml/foreman/"
|
||||
"#{puppetdir}/yaml/foreman/#{certname}.yaml"
|
||||
end
|
||||
|
||||
def tsecs
|
||||
SETTINGS[:timeout] || 10
|
||||
end
|
||||
|
||||
def thread_count
|
||||
return SETTINGS[:threads].to_i if not SETTINGS[:threads].nil? and SETTINGS[:threads].to_i > 0
|
||||
require 'facter'
|
||||
processors = Facter.value(:processorcount).to_i
|
||||
processors > 0 ? processors : 1
|
||||
end
|
||||
|
||||
class Http_Fact_Requests
|
||||
include Enumerable
|
||||
|
||||
def initialize
|
||||
@results_array = []
|
||||
end
|
||||
|
||||
def <<(val)
|
||||
@results_array << val
|
||||
end
|
||||
|
||||
def each(&block)
|
||||
@results_array.each(&block)
|
||||
end
|
||||
|
||||
def pop
|
||||
@results_array.pop
|
||||
end
|
||||
end
|
||||
|
||||
class FactUploadError < StandardError; end
|
||||
class NodeRetrievalError < StandardError; end
|
||||
|
||||
require 'etc'
|
||||
require 'net/http'
|
||||
require 'net/https'
|
||||
require 'fileutils'
|
||||
require 'timeout'
|
||||
begin
|
||||
require 'json'
|
||||
rescue LoadError
|
||||
# Debian packaging guidelines state to avoid needing rubygems, so
|
||||
# we only try to load it if the first require fails (for RPMs)
|
||||
begin
|
||||
require 'rubygems' rescue nil
|
||||
require 'json'
|
||||
rescue LoadError => e
|
||||
puts "You need the `json` gem to use the Foreman ENC script"
|
||||
# code 1 is already used below
|
||||
exit 2
|
||||
end
|
||||
end
|
||||
|
||||
def parse_file(filename)
|
||||
case File.extname(filename)
|
||||
when '.yaml'
|
||||
data = File.read(filename)
|
||||
YAML.safe_load(data.gsub(/\!ruby\/object.*$/,''), permitted_classes: [Symbol, Time])
|
||||
when '.json'
|
||||
JSON.parse(File.read(filename))
|
||||
else
|
||||
raise "Unknown extension for file '#{filename}'"
|
||||
end
|
||||
end
|
||||
|
||||
def empty_values_hash?(facts_file)
|
||||
puppet_facts = parse_file(facts_file)
|
||||
puppet_facts['values'].empty?
|
||||
end
|
||||
|
||||
def process_host_facts(certname)
|
||||
f = fact_file(certname)
|
||||
if File.size(f) != 0
|
||||
if empty_values_hash?(f)
|
||||
puts "Empty values hash in fact file #{f}, not uploading"
|
||||
return 0
|
||||
end
|
||||
|
||||
req = generate_fact_request(certname, f)
|
||||
begin
|
||||
upload_facts(certname, req) if req
|
||||
return 0
|
||||
rescue => e
|
||||
$stderr.puts "During fact upload occurred an exception: #{e}"
|
||||
return 1
|
||||
end
|
||||
else
|
||||
$stderr.puts "Fact file #{f} does not contain any facts"
|
||||
return 2
|
||||
end
|
||||
end
|
||||
|
||||
def process_all_facts(http_requests)
|
||||
fact_files.each do |f|
|
||||
# Skip empty host fact files
|
||||
if File.size(f) != 0
|
||||
if empty_values_hash?(f)
|
||||
puts "Empty values hash in fact file #{f}, not uploading"
|
||||
next
|
||||
end
|
||||
|
||||
certname = certname_from_filename(f)
|
||||
req = generate_fact_request(certname, f)
|
||||
if http_requests
|
||||
http_requests << [certname, req]
|
||||
elsif req
|
||||
upload_facts(certname, req)
|
||||
end
|
||||
else
|
||||
$stderr.puts "Fact file #{f} does not contain any fact"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def build_body(certname,filename)
|
||||
puppet_facts = parse_file(filename)
|
||||
hostname = puppet_facts['values']['fqdn'] || certname
|
||||
|
||||
# if there is no environment in facts
|
||||
# get it from node file ({puppetdir}/yaml/node/
|
||||
unless puppet_facts['values'].key?('environment') || puppet_facts['values'].key?('agent_specified_environment')
|
||||
node_filename = filename.sub('/facts/', '/node/')
|
||||
if File.exist?(node_filename)
|
||||
node_data = parse_file(node_filename)
|
||||
|
||||
if node_data.key?('environment')
|
||||
puppet_facts['values']['environment'] = node_data['environment']
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
begin
|
||||
require 'facter'
|
||||
puppet_facts['values']['puppetmaster_fqdn'] = Facter.value('networking.fqdn').to_s
|
||||
rescue LoadError
|
||||
puppet_facts['values']['puppetmaster_fqdn'] = `hostname -f`.strip
|
||||
end
|
||||
|
||||
# filter any non-printable char from the value, if it is a String
|
||||
puppet_facts['values'].each do |key, val|
|
||||
if val.is_a? String
|
||||
puppet_facts['values'][key] = val.scan(/[[:print:]]/).join
|
||||
end
|
||||
end
|
||||
|
||||
{'facts' => puppet_facts['values'], 'name' => hostname, 'certname' => certname}
|
||||
end
|
||||
|
||||
def initialize_http(uri)
|
||||
res = Net::HTTP.new(uri.host, uri.port)
|
||||
res.open_timeout = SETTINGS[:timeout]
|
||||
res.read_timeout = SETTINGS[:timeout]
|
||||
res.use_ssl = uri.scheme == 'https'
|
||||
if res.use_ssl?
|
||||
if SETTINGS[:ssl_ca] && !SETTINGS[:ssl_ca].empty?
|
||||
res.ca_file = SETTINGS[:ssl_ca]
|
||||
res.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
||||
else
|
||||
res.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||
end
|
||||
if SETTINGS[:ssl_cert] && !SETTINGS[:ssl_cert].empty? && SETTINGS[:ssl_key] && !SETTINGS[:ssl_key].empty?
|
||||
res.cert = OpenSSL::X509::Certificate.new(File.read(SETTINGS[:ssl_cert]))
|
||||
res.key = OpenSSL::PKey::RSA.new(File.read(SETTINGS[:ssl_key]), nil)
|
||||
end
|
||||
end
|
||||
res
|
||||
end
|
||||
|
||||
def generate_fact_request(certname, filename)
|
||||
# Temp file keeping the last run time
|
||||
stat = stat_file("#{certname}-push-facts")
|
||||
last_run = File.exist?(stat) ? File.stat(stat).mtime.utc : Time.now - 365*24*60*60
|
||||
last_fact = File.exist?(filename) ? File.stat(filename).mtime.utc : Time.at(0)
|
||||
if last_fact > last_run
|
||||
begin
|
||||
uri = URI.parse("#{url}/api/hosts/facts")
|
||||
req = Net::HTTP::Post.new(uri.request_uri)
|
||||
req.add_field('Accept', 'application/json,version=2' )
|
||||
req.content_type = 'application/json'
|
||||
req.body = build_body(certname, filename).to_json
|
||||
req
|
||||
rescue => e
|
||||
raise "Could not generate facts for Foreman: #{e}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def cache(certname, result)
|
||||
File.open(stat_file(certname), 'w') {|f| f.write(result) }
|
||||
end
|
||||
|
||||
def read_cache(certname)
|
||||
File.read(stat_file(certname))
|
||||
rescue => e
|
||||
raise "Unable to read from Cache file: #{e}"
|
||||
end
|
||||
|
||||
def enc(certname)
|
||||
uri = URI.parse("#{url}/node/#{certname}?format=yml")
|
||||
req = Net::HTTP::Get.new(uri.request_uri)
|
||||
initialize_http(uri).start do |http|
|
||||
response = http.request(req)
|
||||
|
||||
unless response.code == "200"
|
||||
raise NodeRetrievalError, "Error retrieving node #{certname}: #{response.class}\nCheck Foreman's /var/log/foreman/production.log for more information."
|
||||
end
|
||||
response.body
|
||||
end
|
||||
end
|
||||
|
||||
def upload_facts(certname, req)
|
||||
return nil if req.nil?
|
||||
uri = URI.parse("#{url}/api/hosts/facts")
|
||||
begin
|
||||
initialize_http(uri).start do |http|
|
||||
response = http.request(req)
|
||||
if response.code.start_with?('2')
|
||||
cache("#{certname}-push-facts", "Facts from this host were last pushed to #{uri} at #{Time.now}\n")
|
||||
else
|
||||
$stderr.puts "#{certname}: During the fact upload the server responded with: #{response.code} #{response.message}. Error is ignored and the execution continues."
|
||||
$stderr.puts response.body
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
$stderr.puts "During fact upload occured an exception: #{e}"
|
||||
raise FactUploadError, "Could not send facts to Foreman: #{e}"
|
||||
end
|
||||
end
|
||||
|
||||
def upload_facts_parallel(http_fact_requests, wait = true)
|
||||
t = thread_count.times.map {
|
||||
Thread.new(http_fact_requests) do |fact_requests|
|
||||
while factref = fact_requests.pop
|
||||
certname = factref[0]
|
||||
httpobj = factref[1]
|
||||
if httpobj
|
||||
upload_facts(certname, httpobj)
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
||||
if wait
|
||||
t.each(&:join)
|
||||
end
|
||||
end
|
||||
|
||||
def watch_and_send_facts(parallel)
|
||||
begin
|
||||
require 'inotify'
|
||||
rescue LoadError
|
||||
puts "You need the `ruby-inotify` (not inotify!) gem to watch for fact updates"
|
||||
exit 2
|
||||
end
|
||||
|
||||
watch_descriptors = []
|
||||
pending = []
|
||||
threads = thread_count
|
||||
last_send = Time.now
|
||||
|
||||
inotify_limit = `sysctl fs.inotify.max_user_watches`.gsub(/[^\d]/, '').to_i
|
||||
|
||||
inotify = Inotify.new
|
||||
|
||||
fact_dir = fact_directory
|
||||
|
||||
# actually we need only MOVED_TO events because puppet uses File.rename after tmp file created and flushed.
|
||||
# see lib/puppet/util.rb near line 469
|
||||
inotify.add_watch(fact_dir, Inotify::CREATE | Inotify::MOVED_TO )
|
||||
|
||||
files = fact_files
|
||||
|
||||
if files.length > inotify_limit
|
||||
puts "Looks like your inotify watch limit is #{inotify_limit} but you are asking to watch at least #{files.length} fact files."
|
||||
puts "Increase the watch limit via the system tunable fs.inotify.max_user_watches, exiting."
|
||||
exit 2
|
||||
end
|
||||
|
||||
files.each do |f|
|
||||
begin
|
||||
watch_descriptors[inotify.add_watch(f, Inotify::CLOSE_WRITE)] = f
|
||||
end
|
||||
end
|
||||
|
||||
inotify.each_event do |ev|
|
||||
fn = watch_descriptors[ev.wd]
|
||||
add_watch = false
|
||||
|
||||
unless fn
|
||||
# inotify returns basename for renamed file as ev.name
|
||||
# but we need full path
|
||||
fn = File.join(fact_dir, ev.name)
|
||||
add_watch = true
|
||||
end
|
||||
|
||||
if File.extname(fn) != ".#{fact_extension}"
|
||||
next
|
||||
end
|
||||
|
||||
if add_watch || (ev.mask & Inotify::ONESHOT)
|
||||
watch_descriptors[inotify.add_watch(fn, Inotify::CLOSE_WRITE)] = fn
|
||||
end
|
||||
|
||||
if fn
|
||||
certname = certname_from_filename(fn)
|
||||
req = generate_fact_request certname, fn
|
||||
if parallel
|
||||
pending << [certname,req]
|
||||
else
|
||||
upload_facts(certname,req)
|
||||
end
|
||||
end
|
||||
if parallel && (pending.length >= threads || ((last_send + 5) < Time.now))
|
||||
if pending.length > 0
|
||||
upload_facts_parallel(pending, false)
|
||||
pending = []
|
||||
end
|
||||
last_send = Time.now
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Actual code starts here
|
||||
|
||||
if __FILE__ == $0 then
|
||||
# Setuid to puppet user if we can
|
||||
begin
|
||||
Process::GID.change_privilege(Etc.getgrnam(puppetuser).gid) unless Etc.getpwuid.name == puppetuser
|
||||
Process::UID.change_privilege(Etc.getpwnam(puppetuser).uid) unless Etc.getpwuid.name == puppetuser
|
||||
# Facter (in thread_count) tries to read from $HOME, which is still /root after the UID change
|
||||
ENV['HOME'] = Etc.getpwnam(puppetuser).dir
|
||||
# Change CWD to the determined home directory before continuing to make
|
||||
# sure we don't reside in /root or anywhere else we don't have access
|
||||
# permissions
|
||||
Dir.chdir ENV['HOME']
|
||||
rescue
|
||||
$stderr.puts "cannot switch to user #{puppetuser}, continuing as '#{Etc.getpwuid.name}'"
|
||||
end
|
||||
|
||||
begin
|
||||
no_env = ARGV.delete("--no-environment")
|
||||
watch = ARGV.delete("--watch-facts")
|
||||
push_facts_parallel = ARGV.delete("--push-facts-parallel")
|
||||
push_facts = ARGV.delete("--push-facts")
|
||||
if watch && ! ( push_facts || push_facts_parallel )
|
||||
raise "Cannot watch for facts without specifying --push-facts or --push-facts-parallel"
|
||||
end
|
||||
if push_facts
|
||||
# push all facts files to Foreman and don't act as an ENC
|
||||
if ARGV.empty?
|
||||
process_all_facts(false)
|
||||
else
|
||||
process_host_facts(ARGV[0])
|
||||
end
|
||||
elsif push_facts_parallel
|
||||
http_fact_requests = Http_Fact_Requests.new
|
||||
process_all_facts(http_fact_requests)
|
||||
upload_facts_parallel(http_fact_requests)
|
||||
else
|
||||
certname = ARGV[0] || raise("Must provide certname as an argument")
|
||||
#
|
||||
# query External node
|
||||
begin
|
||||
result = ""
|
||||
Timeout.timeout(tsecs) do
|
||||
# send facts to Foreman - enable 'facts' setting to activate
|
||||
# if you use this option below, make sure that you don't send facts to foreman via the rake task or push facts alternatives.
|
||||
#
|
||||
if SETTINGS[:facts]
|
||||
req = generate_fact_request(certname, fact_file(certname))
|
||||
upload_facts(certname, req)
|
||||
end
|
||||
|
||||
result = enc(certname)
|
||||
cache(certname, result)
|
||||
end
|
||||
rescue Timeout::Error, SocketError, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, NodeRetrievalError, FactUploadError => e
|
||||
$stderr.puts "Serving cached ENC: #{e}"
|
||||
# Read from cache, we got some sort of an error.
|
||||
result = read_cache(certname)
|
||||
end
|
||||
|
||||
if no_env
|
||||
require 'yaml'
|
||||
yaml = YAML.safe_load(result)
|
||||
yaml.delete('environment')
|
||||
# Always reset the result to back to clean yaml on our end
|
||||
puts yaml.to_yaml
|
||||
else
|
||||
puts result
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
warn e
|
||||
exit 1
|
||||
end
|
||||
if watch
|
||||
watch_and_send_facts(push_facts_parallel)
|
||||
end
|
||||
end
|
||||
@@ -1,7 +1,6 @@
|
||||
###############################################################################
|
||||
########## puppetdb.conf managed by puppet agent ##########
|
||||
###############################################################################
|
||||
|
||||
[main]
|
||||
server_urls = https://<%= @pt_puppetdb_server%>:<%= @pt_ssl_port %>
|
||||
server_urls = https://<%= @pt_puppetdb_fqdn %>:<%= @pt_ssl_port %>
|
||||
soft_write_failure = <%= @pt_soft_write_failure %>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
###############################################################################
|
||||
########## repl.ini managed by puppet agent ##########
|
||||
######### File created by Puppet - manual changes will be overwritten #########
|
||||
###############################################################################
|
||||
|
||||
[nrepl]
|
||||
<% if @pt_enable_repl == true %>
|
||||
enabled = <%= @pt_enable_repl %>
|
||||
port = <% @pt_repl_port %>
|
||||
# Set to true to enable the remote REPL
|
||||
enabled = <%= @pt_repl_on %>
|
||||
|
||||
# What port the REPL should listen on
|
||||
port = <%= @pt_repl_port %>
|
||||
|
||||
# IP address to listen on
|
||||
host = <%= @pt_repl_host %>
|
||||
<% else %>
|
||||
# REPL is disabled for security reasons and not normally not required.
|
||||
# To enable it, set `$pt_enable_repl` to `true`.
|
||||
<% end %>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<configuration debug="false">
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file><%= @pt_puppetdb_access_log %>.log</file>
|
||||
<file>/var/log/puppetlabs/puppetdb/puppetdb-access.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern><%= @pt_puppetdb_access_log %>-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<fileNamePattern>/var/log/puppetlabs/puppetdb/puppetdb-access-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
|
||||
<maxFileSize><%= @pt_logging_max_file_size %></maxFileSize>
|
||||
<maxHistory><%= @pt_loging_max_history %></maxHistory>
|
||||
<totalSizeCap><%= @pt_logging_total_size %></totalSizeCap>
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<maxHistory>90</maxHistory>
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" %D</pattern>
|
||||
<pattern>%h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" %D %header{X-Uncompressed-Length}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender-ref ref="FILE" />
|
||||
|
||||
5
templates/puppetdb/routes.yaml.erb
Normal file
5
templates/puppetdb/routes.yaml.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
master:
|
||||
facts:
|
||||
terminus: puppetdb
|
||||
cache: json
|
||||
1
templates/puppetdb/server.crt.erb
Normal file
1
templates/puppetdb/server.crt.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= @pt_pptdb_server_crt %>
|
||||
1
templates/puppetdb/server.key.erb
Normal file
1
templates/puppetdb/server.key.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= @pt_pptdb_server_key %>
|
||||
51
templates/puppetdb/service.conf.erb
Normal file
51
templates/puppetdb/service.conf.erb
Normal file
@@ -0,0 +1,51 @@
|
||||
###############################################################################
|
||||
######### File created by Puppet - manual changes will be overwritten #########
|
||||
###############################################################################
|
||||
#
|
||||
# Local settings can be configured without being overwritten by package upgrades, for example
|
||||
# if you want to increase puppetdb open-files-limit to 10000,
|
||||
# you need to increase systemd's LimitNOFILE setting, so create a file named
|
||||
# "/etc/systemd/system/puppetdb.service.d/limits.conf" containing:
|
||||
# [Service]
|
||||
# LimitNOFILE=10000
|
||||
# You can confirm it worked by running systemctl daemon-reload
|
||||
# then running systemctl show puppetdb | grep LimitNOFILE
|
||||
#
|
||||
[Unit]
|
||||
Description=puppetdb Service
|
||||
After=syslog.target network.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
EnvironmentFile=/etc/sysconfig/puppetdb
|
||||
User=puppetdb
|
||||
TimeoutStartSec=14400
|
||||
TimeoutStopSec=60
|
||||
Restart=on-failure
|
||||
StartLimitBurst=5
|
||||
PIDFile=/run/puppetlabs/puppetdb/puppetdb.pid
|
||||
|
||||
# https://tickets.puppetlabs.com/browse/EZ-129
|
||||
# Prior to systemd v228, TasksMax was unset by default, and unlimited. Starting in 228 a default of '512'
|
||||
# was implemented. This is low enough to cause problems for certain applications. In systemd 231, the
|
||||
# default was changed to be 15% of the default kernel limit. This explicitly sets TasksMax to 4915,
|
||||
# which should match the default in systemd 231 and later.
|
||||
# See https://github.com/systemd/systemd/issues/3211#issuecomment-233676333
|
||||
TasksMax=4915
|
||||
|
||||
#set default privileges to -rw-r-----
|
||||
UMask=027
|
||||
|
||||
|
||||
ExecReload=/opt/puppetlabs/server/apps/puppetdb/bin/puppetdb reload
|
||||
ExecStart=/opt/puppetlabs/server/apps/puppetdb/bin/puppetdb start
|
||||
ExecStop=/opt/puppetlabs/server/apps/puppetdb/bin/puppetdb stop
|
||||
|
||||
KillMode=process
|
||||
|
||||
SuccessExitStatus=143
|
||||
|
||||
StandardOutput=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
7
templates/r10k/r10k.yaml.erb
Normal file
7
templates/r10k/r10k.yaml.erb
Normal file
@@ -0,0 +1,7 @@
|
||||
:cachedir: /var/cache/r10k
|
||||
|
||||
:sources:
|
||||
:puppet:
|
||||
remote: <%= @pt_r10k_remote %>
|
||||
prefix: <%= @pt_r10k_prefix %>
|
||||
basedir: '<%= @pt_r10k_basedir %>'
|
||||
12
templates/r10k/r10k_webhook_service.erb
Normal file
12
templates/r10k/r10k_webhook_service.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=r10k GitLab Webhook
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/r10k_gitlab_webhook <%= @pt_r10k_webhook_port %>
|
||||
Restart=always
|
||||
User=root
|
||||
WorkingDirectory=/etc/puppetlabs/code
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user