aboutsummaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-03-30 07:27:34 +0000
committerGerrit Code Review <review@openstack.org>2017-03-30 07:27:34 +0000
commitd5ac7a238517d88b565db75cf03e2050d810c9d0 (patch)
tree5817b666d81c744b8f684b1fd714b125f92cc6a8 /manifests
parent1e62cb44fafe6aaa9222d70896d64b25d29426b9 (diff)
parent87850942adfe0a2ed44441913d2442d1fd86a809 (diff)
Merge "Adds service for managing securetty"
Diffstat (limited to 'manifests')
-rw-r--r--manifests/profile/base/securetty.pp46
1 files changed, 46 insertions, 0 deletions
diff --git a/manifests/profile/base/securetty.pp b/manifests/profile/base/securetty.pp
new file mode 100644
index 0000000..a04c559
--- /dev/null
+++ b/manifests/profile/base/securetty.pp
@@ -0,0 +1,46 @@
+# Copyright 2016 Red Hat, Inc.
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::securetty
+#
+# Sets securetty Parameters
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+# [*tty_list*]
+# Hash of values for /etc/securetty console
+# Defaults to hiera('securetty::tty_list')
+#
+class tripleo::profile::base::securetty (
+ $step = hiera('step'),
+ $tty_list = hiera('tty_list)', []),
+) {
+ if $step >=1 {
+ $ttys = join( $tty_list, "\n")
+
+ file { '/etc/securetty':
+ ensure => file,
+ content => template( 'tripleo/securetty/securetty.erb' ),
+ owner => 'root',
+ group => 'root',
+ mode => '0600'
+ }
+ }
+}