Skip to content

Commit

Permalink
disable config.yaml show_diff
Browse files Browse the repository at this point in the history
To prevent the 'token` secret from leaking into the agent logs.
  • Loading branch information
jhoblitt committed Jun 26, 2024
1 parent 8ee99fd commit 4303828
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
assert_private()

file { '/etc/rancher/rke2/config.yaml':
ensure => file,
owner => 'root',
group => 'root',
mode => '0600',
content => stdlib::to_yaml($rke2::config),
ensure => file,
owner => 'root',
group => 'root',
mode => '0600',
show_diff => false, # don't print 'token' into logs
content => stdlib::to_yaml($rke2::config),
}

# The config.yaml.d directory is used by default. As we are using an all-in-one config
Expand Down
8 changes: 4 additions & 4 deletions spec/support/acceptance/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
end

def cleanup_rpm
on hosts, %[
dnf erase -y rke2\*
rm -f /etc/yum.repos.d/rancher\*
]
on hosts, %(
dnf erase -y rke2*
rm -f /etc/yum.repos.d/rancher*
)
end

RSpec.configure do |c|
Expand Down

0 comments on commit 4303828

Please sign in to comment.