File tree 4 files changed +11
-9
lines changed
4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 366
366
default => ' present' ,
367
367
}
368
368
369
- $auth_conf_tmp = epp (' apt/auth_conf.epp' )
369
+ $auth_conf_tmp = stdlib::deferrable_epp (' apt/auth_conf.epp' , { ' auth_conf_entries ' => $auth_conf_entries } )
370
370
371
371
file { '/etc/apt/auth.conf' :
372
372
ensure => $auth_conf_ensure ,
373
373
owner => $auth_conf_owner ,
374
374
group => ' root' ,
375
375
mode => ' 0600' ,
376
- content => Sensitive(" ${confheadertmp}${ auth_conf_tmp} " ),
376
+ content => Sensitive($ auth_conf_tmp ),
377
377
notify => Class[' apt::update' ],
378
378
}
379
379
}
Original file line number Diff line number Diff line change 415
415
super ( ) . merge ( manage_auth_conf : true )
416
416
end
417
417
418
- auth_conf_content = "// This file is managed by Puppet. DO NOT EDIT.
419
- machine deb.example.net login foologin password secret
420
- machine apt.example.com login aptlogin password supersecret
421
- "
418
+ auth_conf_content = <<~CONTENT
419
+ // This file is managed by Puppet. DO NOT EDIT.
420
+ machine deb.example.net login foologin password secret
421
+ machine apt.example.com login aptlogin password supersecret
422
+ CONTENT
422
423
423
424
it {
424
425
expect ( subject ) . to contain_file ( '/etc/apt/auth.conf' ) . with ( ensure : 'present' ,
Original file line number Diff line number Diff line change 130
130
131
131
it {
132
132
expect ( subject ) . to contain_apt__key ( "Add key: #{ id } from Apt::Source my_source" ) . that_comes_before ( 'Apt::Setting[list-my_source]' ) . with ( ensure : 'refreshed' ,
133
- id : GPG_KEY_ID ,
133
+ id : id ,
134
134
server : 'pgp.mit.edu' ,
135
135
content : 'GPG key content' ,
136
136
source : 'http://apt.puppetlabs.com/pubkey.gpg' ,
Original file line number Diff line number Diff line change 1
- <% if $apt::auth_conf_entries != [] { -%>
2
- <% $apt::auth_conf_entries.each | $auth_conf_entry | { -%>
1
+ // This file is managed by Puppet. DO NOT EDIT.
2
+ <% if $auth_conf_entries != [] { -%>
3
+ <% $auth_conf_entries.each | $auth_conf_entry | { -%>
3
4
machine <%= $auth_conf_entry['machine'] %> login <%= $auth_conf_entry['login'] %> password <%= $auth_conf_entry['password'] %>
4
5
<% } -%>
5
6
<% } -%>
You can’t perform that action at this time.
0 commit comments