File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 366366 default => ' present' ,
367367 }
368368
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 } )
370370
371371 file { '/etc/apt/auth.conf' :
372372 ensure => $auth_conf_ensure ,
373373 owner => $auth_conf_owner ,
374374 group => ' root' ,
375375 mode => ' 0600' ,
376- content => Sensitive(" ${confheadertmp}${ auth_conf_tmp} " ),
376+ content => Sensitive($ auth_conf_tmp ),
377377 notify => Class[' apt::update' ],
378378 }
379379 }
Original file line number Diff line number Diff line change 415415 super ( ) . merge ( manage_auth_conf : true )
416416 end
417417
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
422423
423424 it {
424425 expect ( subject ) . to contain_file ( '/etc/apt/auth.conf' ) . with ( ensure : 'present' ,
Original file line number Diff line number Diff line change 130130
131131 it {
132132 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 ,
134134 server : 'pgp.mit.edu' ,
135135 content : 'GPG key content' ,
136136 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 | { -%>
34machine <%= $auth_conf_entry['machine'] %> login <%= $auth_conf_entry['login'] %> password <%= $auth_conf_entry['password'] %>
45<% } -%>
56<% } -%>
You can’t perform that action at this time.
0 commit comments