Skip to content

Commit

Permalink
Allow and remove old yumstage key
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Aug 27, 2023
1 parent 257ce69 commit 79ba007
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions puppet/modules/secure_ssh/manifests/rsync/uploader_key.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
Stdlib::Absolutepath $dir = "/home/${user}/.ssh",
Stdlib::Filemode $mode = '0600',
Boolean $manage_dir = false,
String[1] $ensure => 'present',
) {
secure_ssh::uploader_key { $name:
ensure => $ensure,
user => $user,
dir => $dir,
mode => $mode,
Expand Down
3 changes: 3 additions & 0 deletions puppet/modules/secure_ssh/manifests/uploader_key.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# The name of the key
#
define secure_ssh::uploader_key (
String[1] $ensure => 'present',
String[1] $user,
Stdlib::Absolutepath $dir = "/home/${user}/.ssh",
Stdlib::Filemode $mode = '0600',
Expand All @@ -34,12 +35,14 @@
}

file { "${dir}/${ssh_key_name}":
ensure => $ensure,
owner => $user,
mode => '0400',
content => $priv_key,
}

file { "${dir}/${ssh_key_name}.pub":
ensure => $ensure,
owner => $user,
mode => '0644',
content => "ssh-rsa ${pub_key} ${ssh_key_name} from puppetmaster\n",
Expand Down
6 changes: 6 additions & 0 deletions puppet/modules/slave/manifests/packaging/rpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,10 @@
dir => "${workspace}/staging_key",
manage_dir => true,
}

secure_ssh::rsync::uploader_key { 'yumstage':
ensure => 'absent',
user => $user,
}

}

0 comments on commit 79ba007

Please sign in to comment.