diff --git a/manifests/tal_cli.pp b/manifests/tal_cli.pp index 530af22eeef3722a1caba428ef10523eb40ae0ac..b581eb1b66de295181a9b7d6cadbc3ebc2bdabb8 100644 --- a/manifests/tal_cli.pp +++ b/manifests/tal_cli.pp @@ -1,11 +1,11 @@ # @summary -# Describe what this class do! +# Command-line interface to TAL. # -# Detailed summary info if suitable +# Clones and compiles repo to provide TAL access. # # # @param credentials -# Describe credentials +# Credentials for TAL access. # class aes::tal_cli ( Optional[String] $credentials = undef @@ -49,12 +49,26 @@ class aes::tal_cli ( source => "puppet:///modules/${module_name}/tal/on_update.sh", } - exec { 'update-tal-repo' : - command => '/opt/utils/update_repo.sh /home/examadm/tal-cli/source https://oauth2:glpat-bfpVssm_zFmt1YRW7cLz@gitlab.liu.se/upp-aes/tal-cli.git master', - environment => ['REPO_ON_UPDATE=/home/examadm/tal-cli/on_update.sh'], + vcsrepo { '/home/examadm/tal-cli/source': + submodules => false, + ensure => latest, + provider => git, + source => 'https://oauth2:glpat-bfpVssm_zFmt1YRW7cLz@gitlab.liu.se/upp-aes/tal-cli.git', + revision => master, + owner => examadm, + group => examadm, + notify => Exec['compile-tal-repo'], + } + + exec { 'compile-tal-repo': user => examadm, group => examadm, cwd => '/home/examadm/tal-cli', + path => '/bin:/usr/bin', + environment => ['HOME=/home/examadm/tal-cli'], + creates => '/home/examadm/tal-cli/source/tal', + command => '/home/examadm/tal-cli/on_update.sh', + require => File['/home/examadm/tal-cli/on_update.sh'], } file { '/etc/cron.daily/tal-remind' :