File tree 4 files changed +10
-2
lines changed
4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 59
59
Optional[String] $stagingdir = undef ,
60
60
Enum[direct,bolthost] $download_mode = ' bolthost' ,
61
61
Boolean $permit_unsafe_versions = false ,
62
+ String $token_lifetime = ' 1y' ,
62
63
) {
63
64
peadm::assert_supported_bolt_version()
64
65
96
97
stagingdir => $stagingdir ,
97
98
download_mode => $download_mode ,
98
99
permit_unsafe_versions => $permit_unsafe_versions ,
100
+ token_lifetime => $token_lifetime ,
99
101
)
100
102
101
103
$configure_result = run_plan(' peadm::subplans::configure' ,
Original file line number Diff line number Diff line change 58
58
String $stagingdir = ' /tmp' ,
59
59
Enum[direct,bolthost] $download_mode = ' bolthost' ,
60
60
Boolean $permit_unsafe_versions = false ,
61
+ String $token_lifetime = ' 1y' ,
61
62
) {
62
63
peadm::assert_supported_pe_version($version , $permit_unsafe_versions )
63
64
325
326
run_command(' systemctl stop pe-puppetdb' , $primary_target )
326
327
run_command(' systemctl start pe-puppetdb' , $primary_target )
327
328
run_task(' peadm::rbac_token' , $primary_target ,
328
- password => $console_password ,
329
+ password => $console_password ,
330
+ token_lifetime => $token_lifetime ,
329
331
)
330
332
331
333
# Stub a production environment and commit it to file-sync. At least one
Original file line number Diff line number Diff line change 4
4
"password" : {
5
5
"type" : " String" ,
6
6
"description" : " The password for the admin user"
7
+ },
8
+ "token_lifetime" : {
9
+ "type" : " String" ,
10
+ "description" : " The duration for which a token will be valid. Format <integer>[smhdy]"
7
11
}
8
12
},
9
13
"input_method" : " stdin" ,
Original file line number Diff line number Diff line change 17
17
body = {
18
18
'login' => 'admin' ,
19
19
'password' => $params[ 'password' ] ,
20
- 'lifetime' => '1y' ,
20
+ 'lifetime' => $params [ 'token_lifetime' ] ,
21
21
'label' => 'provision-time token' ,
22
22
} . to_json
23
23
You can’t perform that action at this time.
0 commit comments