File tree 5 files changed +36
-6
lines changed
5 files changed +36
-6
lines changed Original file line number Diff line number Diff line change 14
14
15
15
String[1] $compile_master_pool_address = $primary_master_host ,
16
16
Boolean $manage_environment_groups = true ,
17
+ String[1] $token_file = ' ${HOME}/.puppetlabs/token' ,
17
18
Optional[String[1]] $deploy_environment = undef ,
18
19
19
20
String[1] $stagingdir = ' /tmp' ,
64
65
# Run the PE Replica Provision
65
66
run_task(' pe_xl::provision_replica' , $primary_master_target ,
66
67
primary_master_replica => $primary_master_replica_host ,
68
+ token_file => $token_file ,
67
69
)
68
70
69
71
# Run the PE Replica Enable
70
72
run_task(' pe_xl::enable_replica' , $primary_master_target ,
71
73
primary_master_replica => $primary_master_replica_host ,
74
+ token_file => $token_file ,
72
75
)
73
76
74
77
# Run Puppet everywhere to pick up last remaining config tweaks
Original file line number Diff line number Diff line change 4
4
"primary_master_replica" : {
5
5
"type" : " String" ,
6
6
"description" : " The name of the replica to enable"
7
+ },
8
+ "token_file" : {
9
+ "type" : " Optional[String]" ,
10
+ "description" : " The name of the token file to use for auth"
7
11
}
8
12
},
9
13
"input_method" : " environment" ,
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ USER=" ${USER:= $(id -un)} "
4
+ HOME=" ${HOME:= $(getent passwd " $USER " | cut -d : -f 6)} "
5
+
6
+ if [[ " ${PT_token_file} x" != ' x' ]] ; then
7
+ TOKEN_FILE=" $PT_token_file "
8
+ else
9
+ TOKEN_FILE=" ${HOME} /.puppetlabs/token"
10
+ fi
11
+
3
12
set -e
4
13
5
14
env PATH=" /opt/puppetlabs/bin:${PATH} " \
6
- USER=" ${ USER:= $(id -un)} " \
7
- HOME=" ${ HOME:= $(getent passwd " $USER " | cut -d : -f 6)} " \
15
+ USER=" $USER " \
16
+ HOME=" $HOME " \
8
17
puppet infrastructure enable replica " $PT_primary_master_replica " \
9
18
--skip-agent-config \
10
19
--topology mono-with-compile \
11
- --yes
20
+ --yes --token-file " $TOKEN_FILE "
Original file line number Diff line number Diff line change 4
4
"primary_master_replica" : {
5
5
"type" : " String" ,
6
6
"description" : " The name of the replica to provision"
7
+ },
8
+ "token_file" : {
9
+ "type" : " Optional[String]" ,
10
+ "description" : " The name of the token-file for auth"
7
11
}
8
12
},
9
13
"input_method" : " environment" ,
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ USER=" ${USER:= $(id -un)} "
4
+ HOME=" ${HOME:= $(getent passwd " $USER " | cut -d : -f 6)} "
5
+
6
+ if [[ " ${PT_token_file} x" != ' x' ]] ; then
7
+ TOKEN_FILE=" $PT_token_file "
8
+ else
9
+ TOKEN_FILE=" ${HOME} /.puppetlabs/token"
10
+ fi
11
+
3
12
set -e
4
13
5
14
env PATH=" /opt/puppetlabs/bin:${PATH} " \
6
- USER=" ${USER:= $(id -un)} " \
7
- HOME=" ${HOME:= $(getent passwd " $USER " | cut -d : -f 6)} " \
8
- puppet infrastructure provision replica " $PT_primary_master_replica "
15
+ USER=" $USER " \
16
+ HOME=" $HOME " \
17
+ puppet infrastructure provision replica --token-file " $TOKEN_FILE " \
18
+ " $PT_primary_master_replica "
You can’t perform that action at this time.
0 commit comments