Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace legacy facts with modern facts
- Loading branch information
Showing
22 changed files
with
119 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
# @summary Private class | ||
# @api private | ||
class root::params { | ||
|
||
case $::kernel { | ||
case $facts['kernel'] { | ||
'Linux': { | ||
# Do nothing | ||
} | ||
|
||
default: { | ||
fail("Unsupported kernel: ${::kernel}, module ${module_name} only support kernel Linux") | ||
fail("Unsupported kernel: ${facts['kernel']}, module ${module_name} only support kernel Linux") | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# @summary Private class | ||
# @api private | ||
define root::rsakey::collect () { | ||
|
||
Root::Ssh_authorized_key <<| tag == $name |>> | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
# @summary Private class | ||
# @api private | ||
class root::rsakey::export { | ||
|
||
exec { "ssh-keygen root@${::fqdn}": | ||
exec { "ssh-keygen root@${facts['networking']['fqdn']}": | ||
path => '/usr/bin:/bin:/usr/sbin:/sbin', | ||
command => "ssh-keygen -q -t rsa -C root@${::fqdn} -N '' -f /root/.ssh/id_rsa", | ||
command => "ssh-keygen -q -t rsa -C root@${facts['networking']['fqdn']} -N '' -f /root/.ssh/id_rsa", | ||
creates => ['/root/.ssh/id_rsa', '/root/.ssh/id_rsa.pub'], | ||
} | ||
|
||
if $::root_sshrsakey { | ||
@@root::ssh_authorized_key { "root@${::fqdn}": | ||
if $facts['root_sshrsakey'] { | ||
@@root::ssh_authorized_key { "root@${facts['networking']['fqdn']}": | ||
ensure => 'present', | ||
key => $::root_sshrsakey, | ||
key => $facts['root_sshrsakey'], | ||
type => 'ssh-rsa', | ||
options => $::root::export_key_options, | ||
options => $root::export_key_options, | ||
tag => $root::export_key_tag, | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.