Skip to content
Snippets Groups Projects
Commit b118eab6 authored by Thomas Johansson's avatar Thomas Johansson
Browse files

Merge branch 'devel' into 'test'

Devel

See merge request liu-puppet-modules/aes!36
parents 6e62919e eb17babc
No related branches found
No related tags found
3 merge requests!43Klaar36 production patch 83549,!37Test,!36Devel
Pipeline #101775 passed
This commit is part of merge request !37. Comments created here will be created in the context of that merge request.
# aes # aes
Repeated apply in puppet logs are the below
notice /Stage[main]/Aes::Aes_sw/Exec[script-repo-updated]/returns executed successfully (corrective)
notice /Stage[main]/Aes::Tal_cli/Exec[update-tal-repo]/returns executed successfully (corrective)
notice /Stage[main]/Aes::Opendsa/Exec[update-repo]/returns executed successfully (corrective)
notice /Stage[main]/Aes::Broker/Exec[update-broker-repo]/returns executed successfully (corrective)
notice /Stage[main]/Aes::Auth/Exec[update-auth-repo]/returns executed successfully (corrective)
notice /Stage[main]/Aes::Auth_keydb/Exec[update-keydb-repo]/returns executed successfully (corrective)
All use the same script "/opt/utils/update_repo.sh" to update local repo files
Should be possible to run with cron
Why is this required to run within puppet?
notice /Stage[main]/Aes/Exec[/usr/bin/touch /var/last_puppet_run]/returns executed successfully (corrective)
If a semaphore is required, use /opt/puppetlabs/puppet/public/last_run_summary.yaml
Please skip the touch exec!
\ No newline at end of file
...@@ -26,6 +26,32 @@ aes::auth::keytab_devel: > ...@@ -26,6 +26,32 @@ aes::auth::keytab_devel: >
IcAIbgvoQbriFHLJiL9HIWl6GSe6I/jp9n5veEkhHdT3M0nEEc0hbKWBaELj IcAIbgvoQbriFHLJiL9HIWl6GSe6I/jp9n5veEkhHdT3M0nEEc0hbKWBaELj
gTDWfQoET9V1Lrtv] gTDWfQoET9V1Lrtv]
aes::auth::keytab_production_base64: >
ENC[PKCS7,MIIB6wYJKoZIhvcNAQcDoIIB3DCCAdgCAQAxggEhMIIBHQIBADAFMAACAQEw
DQYJKoZIhvcNAQEBBQAEggEAWDNqT2ab63HdYWzW2/9TZrsxEcdDvJBKl87f
vNVOQveZOoK2vB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fV6Nw1M5qPgLS6gsvkOEAe+9FFiFWH1uTNqoZX9jSO4tZ
F0y5pwJ4OpjQS0oiInF+rxET2PTnND6yNtxeSkBncAWnNHA80Z2U7BOZG6Lw
BbBuhpmotOaWx2thqdb2sCNlj3yZMT1k62VXU8rBqzRA3Vj7jiRiXXxcSnnQ]
aes::tal_cli::credentials: > aes::tal_cli::credentials: >
ENC[PKCS7,MIIBiQYJKoZIhvcNAQcDoIIBejCCAXYCAQAxggEhMIIBHQIBAD ENC[PKCS7,MIIBiQYJKoZIhvcNAQcDoIIBejCCAXYCAQAxggEhMIIBHQIBAD
AFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAii6nHpFM6+6aPuw1Qnawf77K7f AFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAii6nHpFM6+6aPuw1Qnawf77K7f
......
# @summary
# Describe what this class do!
#
# Detailed summary info if suitable
#
class aes::aes_sw { class aes::aes_sw {
$examadm_user = examadm $examadm_user = examadm
$examadm_group = $examadm_user $examadm_group = $examadm_user
...@@ -34,24 +39,29 @@ class aes::aes_sw { ...@@ -34,24 +39,29 @@ class aes::aes_sw {
group => $examadm_group, group => $examadm_group,
} }
# lint:ignore:140chars
file { "${examadm_home}/.ssh/authorized_keys": file { "${examadm_home}/.ssh/authorized_keys":
ensure => file, ensure => file,
mode => '0600', mode => '0600',
owner => $examadm_user, owner => $examadm_user,
group => $examadm_group, group => $examadm_group,
# lint:ignore:strict_indent heredoc failing...
content => @(SSHPUBKEY), content => @(SSHPUBKEY),
command="/home/examadm/tal-cli/source/scripts/tal-export.py --format ics --lookback 90 --lookahead 180",no-pty,no-user-rc,no-port-forwarding,no-agent-forwarding,no-X11-forwarding ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJW4LP0av20r7lPXNgsftF9oaAXK41AvHyuHwybciZC/QBfTcmYif83563cTg0OzR/p+OSobiDM0odaaFYtP/8xbuVRz87X5bGYm2m8yHHqPxobHkT5g/faMkl9Fef+Al4EsT5tiaYMOhG2lj8XRYuwAb7qjoz3FFbs8TEPE7Sv+4BUCCH94taCuNYLXSxN1EXvw7VW6Ld5QXRFP53l2QUeTqE9oSii3BVrXlqqrLvNV/7nwdwyse4uhff4QrM9o4oc9FaQr8PLlPGxdlbSfIQJMVzHGpeDu0WLw+NqtLO1hsdlvQm7GrT/v8N7GJNKlsvhwnwUuMhTrB0yPMbbub1 klaar36@upp command="/home/examadm/tal-cli/source/scripts/tal-export.py --format ics --lookback 90 --lookahead 180",no-pty,no-user-rc,no-port-forwarding,no-agent-forwarding,no-X11-forwarding ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJW4LP0av20r7lPXNgsftF9oaAXK41AvHyuHwybciZC/QBfTcmYif83563cTg0OzR/p+OSobiDM0odaaFYtP/8xbuVRz87X5bGYm2m8yHHqPxobHkT5g/faMkl9Fef+Al4EsT5tiaYMOhG2lj8XRYuwAb7qjoz3FFbs8TEPE7Sv+4BUCCH94taCuNYLXSxN1EXvw7VW6Ld5QXRFP53l2QUeTqE9oSii3BVrXlqqrLvNV/7nwdwyse4uhff4QrM9o4oc9FaQr8PLlPGxdlbSfIQJMVzHGpeDu0WLw+NqtLO1hsdlvQm7GrT/v8N7GJNKlsvhwnwUuMhTrB0yPMbbub1 klaar36@upp
command="/home/examadm/tal-cli/source/scripts/tal-export.py --written --format ics --lookback 90 --lookahead 180",no-pty,no-user-rc,no-port-forwarding,no-agent-forwarding,no-X11-forwarding ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILZ8aEAXw0tRcYrk1aqldepuC6tmdUYZuM270QdDF79o tal written exams to ics command="/home/examadm/tal-cli/source/scripts/tal-export.py --written --format ics --lookback 90 --lookahead 180",no-pty,no-user-rc,no-port-forwarding,no-agent-forwarding,no-X11-forwarding ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILZ8aEAXw0tRcYrk1aqldepuC6tmdUYZuM270QdDF79o tal written exams to ics
| SSHPUBKEY | SSHPUBKEY
# lint:endignore:strict_indent
} }
# lint:endignore:140chars
file { '/etc/systemd/system/aes_login.service': file { '/etc/systemd/system/aes_login.service':
ensure => file, ensure => file,
owner => root, owner => root,
group => root, group => root,
mode => '0644', mode => '0644',
# lint:ignore:strict_indent heredoc failing...
content => @(LOGINSERVICE), content => @(LOGINSERVICE),
[Unit] [Unit]
Description=AES Login server Description=AES Login server
After=network.target After=network.target
...@@ -64,6 +74,7 @@ class aes::aes_sw { ...@@ -64,6 +74,7 @@ class aes::aes_sw {
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
| LOGINSERVICE | LOGINSERVICE
# lint:endignore:strict_indent
} }
# todo: logrotate # todo: logrotate
...@@ -77,8 +88,9 @@ class aes::aes_sw { ...@@ -77,8 +88,9 @@ class aes::aes_sw {
owner => root, owner => root,
group => root, group => root,
mode => '0644', mode => '0644',
# lint:ignore:strict_indent heredoc failing...
content => @(MSSERVICE), content => @(MSSERVICE),
[Unit] [Unit]
Description=AES Exam server Description=AES Exam server
After=network.target After=network.target
...@@ -91,6 +103,7 @@ class aes::aes_sw { ...@@ -91,6 +103,7 @@ class aes::aes_sw {
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
| MSSERVICE | MSSERVICE
# lint:endignore:strict_indent
} }
file { '/etc/cron.daily/aes_ms': file { '/etc/cron.daily/aes_ms':
...@@ -98,10 +111,12 @@ class aes::aes_sw { ...@@ -98,10 +111,12 @@ class aes::aes_sw {
owner => root, owner => root,
group => root, group => root,
mode => '0700', mode => '0700',
# lint:ignore:strict_indent heredoc failing...
content => @(MSCRON), content => @(MSCRON),
#!/bin/sh #!/bin/sh
/usr/bin/systemctl restart aes_ms /usr/bin/systemctl restart aes_ms
| MSCRON | MSCRON
# lint:endignore:strict_indent
} }
file { '/etc/cron.daily/aes_login': file { '/etc/cron.daily/aes_login':
...@@ -109,10 +124,12 @@ class aes::aes_sw { ...@@ -109,10 +124,12 @@ class aes::aes_sw {
owner => root, owner => root,
group => root, group => root,
mode => '0700', mode => '0700',
# lint:ignore:strict_indent heredoc failing...
content => @(MSCRON), content => @(MSCRON),
#!/bin/sh #!/bin/sh
/usr/bin/systemctl restart aes_login /usr/bin/systemctl restart aes_login
| MSCRON | MSCRON
# lint:endignore:strict_indent
} }
# todo: logrotate # todo: logrotate
......
# @summary
# Describe what this class do!
#
# Detailed summary info if suitable
#
#
# @param keytab_production_base64
# Describe keytab_production_base64
#
# @param keytab_devel_base64
# Describe keytab_devel_base64
#
class aes::auth ( class aes::auth (
Optional[String] $keytab_production = undef, # Comment out old keytab params but
Optional[String] $keytab_devel = undef # keep temporay for comparison
#
# # Existing keytabs
# Optional[String] $keytab_production = undef,
# Optional[String] $keytab_devel = undef
#
# new base64+pkcs7 keytabs
Optional[String] $keytab_production_base64 = undef,
Optional[String] $keytab_devel_base64 = undef
) { ) {
$auth_user = auth $auth_user = auth
$auth_group = $auth_user $auth_group = $auth_user
$auth_home = "/srv/${auth_user}" $auth_home = "/srv/${auth_user}"
$auth_service = 'aes_auth' $auth_service = 'aes_auth'
# Decode base64 encoded keytabs
$keytab_production = Binary.new($keytab_production_base64, '%b')
$keytab_devel = Binary.new($keytab_devel_base64, '%b')
# Pick the right keytab for the current environment. We use the fqdn rather than # Pick the right keytab for the current environment. We use the fqdn rather than
# $environment since the keys are tied to the domain name rather than what # $environment since the keys are tied to the domain name rather than what
# environment the machine is configured in. # environment the machine is configured in.
......
# @summary
# Describe what this class do!
#
# Detailed summary info if suitable
#
#
class aes::auth_keydb { class aes::auth_keydb {
$keydb_user = auth_keydb $keydb_user = auth_keydb
$keydb_group = $keydb_user $keydb_group = $keydb_user
......
# @summary
# Describe what this class do!
#
# Detailed summary info if suitable
#
#
class aes::broker { class aes::broker {
$broker_user = broker $broker_user = broker
$broker_group = $broker_user $broker_group = $broker_user
......
# @summary
# Describe what this class do!
#
# Detailed summary info if suitable
#
#
class aes::examfiles { class aes::examfiles {
include users::micis03 include users::micis03
include users::jondy94 include users::jondy94
......
# @summary
# Describe what this class do!
#
# Detailed summary info if suitable
#
#
class aes { class aes {
include aes::examfiles include aes::examfiles
include aes::aes_sw include aes::aes_sw
...@@ -107,8 +113,9 @@ class aes { ...@@ -107,8 +113,9 @@ class aes {
} }
::server_firewall::rules_file { '45-permit_squid.rules': ::server_firewall::rules_file { '45-permit_squid.rules':
# lint:ignore:strict_indent heredoc failing...
content => @(EOF), content => @(EOF),
service squid is tcp/3128 service squid is tcp/3128
service sclogin is tcp/23431 service sclogin is tcp/23431
service aesmsi is tcp/23816 service aesmsi is tcp/23816
service aesmso is tcp/23817 service aesmso is tcp/23817
...@@ -122,5 +129,6 @@ class aes { ...@@ -122,5 +129,6 @@ class aes {
accept service:aesbroker from class:liu-nets accept service:aesbroker from class:liu-nets
end policy end policy
|-EOF |-EOF
# lint:endignore:strict_indent
} }
} }
# @summary
# Describe what this class do!
#
# Detailed summary info if suitable
#
#
class aes::latex { class aes::latex {
package { package {
[ [
......
# @summary
# Describe what this class do!
#
# Detailed summary info if suitable
#
#
class aes::opendsa { class aes::opendsa {
$opendsa_user = opendsa $opendsa_user = opendsa
$opendsa_group = $opendsa_user $opendsa_group = $opendsa_user
......
# @summary
# Describe what this class do!
#
# Detailed summary info if suitable
#
#
class aes::squid_filter { class aes::squid_filter {
package { 'squid' : package { 'squid' :
ensure => 'present', ensure => 'present',
......
# @summary
# Describe what this class do!
#
# Detailed summary info if suitable
#
#
# @param credentials
# Describe credentials
#
class aes::tal_cli ( class aes::tal_cli (
Optional[String] $credentials = undef Optional[String] $credentials = undef
) { ) {
...@@ -53,6 +62,7 @@ class aes::tal_cli ( ...@@ -53,6 +62,7 @@ class aes::tal_cli (
owner => 'root', owner => 'root',
group => 'root', group => 'root',
mode => '0700', mode => '0700',
# lint:ignore:strict_indent heredoc failing...
content => @(END), content => @(END),
#!/bin/bash #!/bin/bash
if [ "$(hostname)" = "aes-devel.edu.liu.se" ] if [ "$(hostname)" = "aes-devel.edu.liu.se" ]
...@@ -67,5 +77,6 @@ class aes::tal_cli ( ...@@ -67,5 +77,6 @@ class aes::tal_cli (
sudo -u examadm /home/examadm/tal-cli/source/scripts/tal-remind.py --to ${TO} --computer-exam --send sudo -u examadm /home/examadm/tal-cli/source/scripts/tal-remind.py --to ${TO} --computer-exam --send
fi fi
| END | END
# lint:endignore:strict_indent
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment