-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from jordiprats/master
autobanner
- Loading branch information
Showing
8 changed files
with
150 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
if File.exists?('/opt/eypconf/id/description.sh') then | ||
description = Facter::Util::Resolution.exec('bash /opt/eypconf/id/description.sh').to_s | ||
else | ||
description = Facter::Util::Resolution.exec('bash -c \'if [ -f /opt/eypconf/id/description ]; then cat /opt/eypconf/id/description | paste -sd,; fi\'').to_s | ||
end | ||
|
||
unless description.nil? or description.empty? | ||
Facter.add('eypconf_description') do | ||
setcode do | ||
description | ||
end | ||
end | ||
|
||
end |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class eyplib::autobanner( | ||
$autobanner_file = '/opt/eypconf/autobanner', | ||
$include_legal = false, | ||
$include_description = true, | ||
$include_puppet_managed_server = true, | ||
) { | ||
file { $autobanner_file: | ||
ensure => 'present', | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0644', | ||
content => template("${module_name}/autobanner.erb"), | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class eyplib::setdescription( | ||
$description = undef | ||
) { | ||
include ::eyplib | ||
|
||
if($description!=undef) | ||
{ | ||
file { '/opt/eypconf/id/description': | ||
ensure => 'present', | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0644', | ||
content => $description, | ||
require => Class['::eyplib'], | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<% if @include_legal -%> | ||
******************************************************************************** | ||
NOTICE | ||
******************************************************************************** | ||
|
||
This is a private system!!! All connection attempts are logged and | ||
monitored. All unauthorized connection attempts will be investigated and | ||
handed over to the proper authorities. | ||
|
||
Users (authorized or unauthorized) have no explicit or implicit | ||
expectation of privacy. | ||
|
||
Any or all uses of this system and all files on this system may be | ||
intercepted, monitored, recorded, copied, audited, inspected, and | ||
disclosed (included but not limited) to your employer, to authorized site, | ||
government, and law enforcement personnel, as well as authorized | ||
officials of government agencies, both domestic and foreign. | ||
|
||
By using this system, the user consents to such interception, monitoring, | ||
recording, copying, auditing, inspection, and disclosure at the | ||
discretion of such personnel or officials. Unauthorized or improper use | ||
of this system may result in civil and criminal penalties and | ||
administrative or disciplinary action, as appropriate. By continuing to | ||
use this system you indicate your awareness of and consent to these terms | ||
and conditions of use. LOG OFF IMMEDIATELY if you do not agree to the | ||
conditions stated in this warning. | ||
|
||
|
||
******************************************************************************** | ||
<% end -%> | ||
<% if @include_description -%> | ||
<% if scope.lookupvar('::eypconf_description') -%> | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
<%= scope.lookupvar('::eypconf_description') %> | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
<% end -%> | ||
<% end -%> | ||
<% if @include_puppet_managed -%> | ||
|
||
******************************************************************************** | ||
puppet managed server | ||
******************************************************************************** | ||
<% end -%> |