From 17be399434051b4eaa5da26dd4695aea867f8d27 Mon Sep 17 00:00:00 2001 From: Klas Arvidsson <klas.arvidsson@liu.se> Date: Tue, 29 Sep 2020 18:04:23 +0200 Subject: [PATCH] corrections --- manifests/aes_broker.pp | 6 +++--- manifests/aes_sw.pp | 36 +++++++++++++++++++++++------------- manifests/latex.pp | 1 + 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/manifests/aes_broker.pp b/manifests/aes_broker.pp index 0c5ce64..8171633 100644 --- a/manifests/aes_broker.pp +++ b/manifests/aes_broker.pp @@ -1,7 +1,7 @@ -class aes::broker { +class aes::aes_broker { $broker_user = broker - $broker_group "${broker_user}" + $broker_group = "${broker_user}" $broker_home = "/srv/${broker_user}" $broker_service = "${broker_user}" @@ -40,4 +40,4 @@ class aes::broker { # TODO: We still need to download the source from Git as needed and update the broker and auth service. # To compile the broker, we need to do "source /opt/rh/devtoolset-7/enable" first. Otherwise, we will not get a good enough GCC. -} \ No newline at end of file +} diff --git a/manifests/aes_sw.pp b/manifests/aes_sw.pp index d7d3c25..3b3001f 100644 --- a/manifests/aes_sw.pp +++ b/manifests/aes_sw.pp @@ -21,6 +21,13 @@ class aes::aes_sw { shell => '/sbin/nologin', } + file { "${examadm_home}": + ensure => directory, + mode => '0755', + owner => "${examadm_user}", + group => "${examadm_group}", + } + file { "/etc/systemd/system/aes_login.service": ensure => present, owner => root, @@ -84,7 +91,20 @@ class aes::aes_sw { ensure => "running", } + file { "${examadm_home}/.ssh/known_hosts": + ensure => present, + owner => "${examadm_user}", + group => "${examadm_group}", + mode => '0644', + content => @(KNOWNHOST) + gitlab.liu.se,2001:6b0:17:f003::44 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBF3yWjkuKo7f3OH4BhGwcd71lkWZqdyk7cxOCn5exPoqLldt2OfbhEA7lM+89Gr/AqRbHlbrS1M8An7j4Lj77hc= + | KNOWNHOST + } + exec { 'script-repo-clone': +# TODO +# git config user.name "aes-devel.edu.liu.se" +# git config user.email "klas.arvidsson@liu.se" command => '/usr/bin/git clone --quiet --single-branch --branch master --depth 1 git@gitlab.liu.se:examadm/scripts.git', cwd => "${examadm_home}", creates => "${examadm_home}/scripts", @@ -99,21 +119,11 @@ class aes::aes_sw { } exec { 'script-repo-pull': - command => '/usr/bin/git pull --depth 1', - cwd => "${examadm_home}/scripts", - onlyif => "/usr/bin/test -d ${examadm_home}/scripts/.git", + cwd => "${examadm_home}", # 'cwd' is set before 'onlyif' and 'command' + onlyif => "/usr/bin/test -d scripts/.git", + command => "/usr/bin/git --git-dir scripts/.git --work-tree scripts pull --depth 1", user => "${examadm_user}", group => "${examadm_group}", # schedule => 'everyday', } - - file { "${examadm_home}/.ssh/known_hosts": - ensure => present, - owner => "${examadm_user}", - group => "${examadm_group}", - mode => '0644', - content => @(KNOWNHOST) - gitlab.liu.se,2001:6b0:17:f003::44 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBF3yWjkuKo7f3OH4BhGwcd71lkWZqdyk7cxOCn5exPoqLldt2OfbhEA7lM+89Gr/AqRbHlbrS1M8An7j4Lj77hc= - | KNOWNHOST - } } diff --git a/manifests/latex.pp b/manifests/latex.pp index c1e1f69..8ea97cf 100644 --- a/manifests/latex.pp +++ b/manifests/latex.pp @@ -10,6 +10,7 @@ class aes::latex { 'texlive-collection-latexrecommended', 'texlive-xetex-def', 'texlive-tcolorbox', + 'texlive-booktabs', 'latexmk', ]: ensure => installed, -- GitLab