git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/site/profile
diff options
context:
space:
mode:
Diffstat (limited to 'site/profile')
-rw-r--r--site/profile/manifests/code_manager.pp11
1 files changed, 7 insertions, 4 deletions
diff --git a/site/profile/manifests/code_manager.pp b/site/profile/manifests/code_manager.pp
index f244564..6416054 100644
--- a/site/profile/manifests/code_manager.pp
+++ b/site/profile/manifests/code_manager.pp
@@ -42,11 +42,14 @@ class profile::code_manager {
}
- if !empty($gms_api_token) {
+ #this file cannont be read until the next run after the above exec
+ #because the file function runs on the master not on the agent
+ #so the file doesn't exist at the time the function is run
+ $rbac_token_file_contents = no_fail_file($token_filename)
- #this file cannont be read until the next run after the above exec
- #because the file function runs on the master not on the agent
- $rbac_token = parsejson(file($token_filename))['token']
+ if !empty($gms_api_token) and !empty($rbac_token_file_contents) {
+
+ $rbac_token = parsejson($rbac_token_file_contents)['token']
$code_manager_webhook_type = $git_management_system ? {
'gitlab' => 'github',