aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/haproxy.pp3
-rw-r--r--manifests/profile/base/docker.pp9
-rw-r--r--manifests/profile/base/neutron/plugins/ml2/bagpipe.pp37
-rw-r--r--manifests/profile/base/neutron/plugins/nsx_v3.pp45
-rw-r--r--manifests/profile/base/sshd.pp34
-rw-r--r--manifests/ui.pp2
-rw-r--r--releasenotes/notes/add-bagpipe-driver-9163f5b22096fde0.yaml1
-rw-r--r--spec/classes/tripleo_profile_base_sshd_spec.rb118
8 files changed, 244 insertions, 5 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index a6bd1eb..d497056 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -718,6 +718,9 @@ class tripleo::haproxy (
if $enable_internal_tls {
$internal_tls_member_options = ['ssl', 'verify required', "ca-file ${ca_bundle}"]
+ Haproxy::Balancermember {
+ verifyhost => true
+ }
} else {
$internal_tls_member_options = []
}
diff --git a/manifests/profile/base/docker.pp b/manifests/profile/base/docker.pp
index 4797d86..d035f6a 100644
--- a/manifests/profile/base/docker.pp
+++ b/manifests/profile/base/docker.pp
@@ -79,12 +79,21 @@ class tripleo::profile::base::docker (
$mirror_changes = [ 'rm dict/entry[. = "registry-mirrors"]', ]
}
+ file { '/etc/docker/daemon.json':
+ ensure => 'present',
+ content => '{}',
+ mode => '0644',
+ replace => false,
+ require => Package['docker']
+ }
+
augeas { 'docker-daemon.json':
lens => 'Json.lns',
incl => '/etc/docker/daemon.json',
changes => $mirror_changes,
subscribe => Package['docker'],
notify => Service['docker'],
+ require => File['/etc/docker/daemon.json'],
}
}
diff --git a/manifests/profile/base/neutron/plugins/ml2/bagpipe.pp b/manifests/profile/base/neutron/plugins/ml2/bagpipe.pp
new file mode 100644
index 0000000..161cd75
--- /dev/null
+++ b/manifests/profile/base/neutron/plugins/ml2/bagpipe.pp
@@ -0,0 +1,37 @@
+#
+# Copyright (C) 2017 Red Hat Inc.
+#
+# Author: Ricardo Noriega <rnoriega@redhat.com>
+#
+# 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::neutron::plugins::ml2::bagpipe
+#
+# Neutron Bagpipe ML2 profile for TripleO
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::plugins::ml2::bagpipe (
+ $step = hiera('step'),
+) {
+ include ::tripleo::profile::base::neutron
+
+ if $step >= 4 {
+ include ::neutron::plugins::ml2::bagpipe
+ }
+}
diff --git a/manifests/profile/base/neutron/plugins/nsx_v3.pp b/manifests/profile/base/neutron/plugins/nsx_v3.pp
new file mode 100644
index 0000000..33fa0cf
--- /dev/null
+++ b/manifests/profile/base/neutron/plugins/nsx_v3.pp
@@ -0,0 +1,45 @@
+# Copyright 2017 VMware, Inc.
+#
+# 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::neutron::plugins::nsx_v3
+#
+# VMware NSXv3 Neutron profile for tripleo
+#
+# === Parameters
+#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::plugins::nsx_v3 (
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $step = hiera('step'),
+) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
+
+ include ::tripleo::profile::base::neutron
+
+ if $step >= 4 or ( $step >= 3 and $sync_db ) {
+ include ::neutron::plugins::nsx_v3
+ }
+}
diff --git a/manifests/profile/base/sshd.pp b/manifests/profile/base/sshd.pp
index 2b86032..3f0245d 100644
--- a/manifests/profile/base/sshd.pp
+++ b/manifests/profile/base/sshd.pp
@@ -27,14 +27,19 @@
# The text used within SSH Banner
# Defaults to hiera('MOTD')
#
+# [*options*]
+# Hash of SSHD options to set. See the puppet-ssh module documentation for
+# details.
+# Defaults to {}
+
class tripleo::profile::base::sshd (
$bannertext = hiera('BannerText', undef),
$motd = hiera('MOTD', undef),
+ $options = {}
) {
- include ::ssh::server
-
- if $bannertext {
+ if $bannertext and $bannertext != '' {
+ $sshd_options_banner = {'Banner' => '/etc/issue.net'}
$filelist = [ '/etc/issue', '/etc/issue.net', ]
file { $filelist:
ensure => file,
@@ -44,9 +49,12 @@ class tripleo::profile::base::sshd (
group => 'root',
mode => '0644'
}
+ } else {
+ $sshd_options_banner = {}
}
- if $motd {
+ if $motd and $motd != '' {
+ $sshd_options_motd = {'PrintMotd' => 'yes'}
file { '/etc/motd':
ensure => file,
backup => false,
@@ -55,5 +63,23 @@ class tripleo::profile::base::sshd (
group => 'root',
mode => '0644'
}
+ } else {
+ $sshd_options_motd = {}
+ }
+
+ $sshd_options = merge(
+ $options,
+ $sshd_options_banner,
+ $sshd_options_motd
+ )
+
+ # NB (owalsh) in puppet-ssh hiera takes precedence over the class param
+ # we need to control this, so error if it's set in hiera
+ if hiera('ssh:server::options', undef) {
+ err('ssh:server::options must not be set, use tripleo::profile::base::sshd::options')
+ }
+ class { '::ssh::server':
+ storeconfigs_enabled => false,
+ options => $sshd_options
}
}
diff --git a/manifests/ui.pp b/manifests/ui.pp
index b2ed178..1745535 100644
--- a/manifests/ui.pp
+++ b/manifests/ui.pp
@@ -39,6 +39,7 @@
# 'de' => 'German',
# 'en' => 'English',
# 'es' => 'Spanish',
+# 'id' => 'Indonesian',
# 'ja' => 'Japanese',
# 'ko-KR' => 'Korean',
# 'zh-CN' => 'Simplified Chinese'
@@ -106,6 +107,7 @@ class tripleo::ui (
'de' => 'German',
'en' => 'English',
'es' => 'Spanish',
+ 'id' => 'Indonesian',
'ja' => 'Japanese',
'ko-KR' => 'Korean',
'zh-CN' => 'Simplified Chinese'
diff --git a/releasenotes/notes/add-bagpipe-driver-9163f5b22096fde0.yaml b/releasenotes/notes/add-bagpipe-driver-9163f5b22096fde0.yaml
index df6b232..3b9f189 100644
--- a/releasenotes/notes/add-bagpipe-driver-9163f5b22096fde0.yaml
+++ b/releasenotes/notes/add-bagpipe-driver-9163f5b22096fde0.yaml
@@ -1,3 +1,4 @@
---
features:
- Add support for Bagpipe Neutron driver as backend in BGPVPN scenarios
+ - Add ML2 plugin configuration for Bagpipe BGPVPN extension
diff --git a/spec/classes/tripleo_profile_base_sshd_spec.rb b/spec/classes/tripleo_profile_base_sshd_spec.rb
index e84a1f5..58b271f 100644
--- a/spec/classes/tripleo_profile_base_sshd_spec.rb
+++ b/spec/classes/tripleo_profile_base_sshd_spec.rb
@@ -24,7 +24,23 @@ describe 'tripleo::profile::base::sshd' do
context 'it should do nothing' do
it do
- is_expected.to contain_class('ssh::server')
+ is_expected.to contain_class('ssh::server').with({
+ 'storeconfigs_enabled' => false,
+ 'options' => {}
+ })
+ is_expected.to_not contain_file('/etc/issue')
+ is_expected.to_not contain_file('/etc/issue.net')
+ is_expected.to_not contain_file('/etc/motd')
+ end
+ end
+
+ context 'it should do nothing with empty strings' do
+ let(:params) {{ :bannertext => '', :motd => '' }}
+ it do
+ is_expected.to contain_class('ssh::server').with({
+ 'storeconfigs_enabled' => false,
+ 'options' => {}
+ })
is_expected.to_not contain_file('/etc/issue')
is_expected.to_not contain_file('/etc/issue.net')
is_expected.to_not contain_file('/etc/motd')
@@ -34,6 +50,12 @@ describe 'tripleo::profile::base::sshd' do
context 'with issue and issue.net configured' do
let(:params) {{ :bannertext => 'foo' }}
it do
+ is_expected.to contain_class('ssh::server').with({
+ 'storeconfigs_enabled' => false,
+ 'options' => {
+ 'Banner' => '/etc/issue.net'
+ }
+ })
is_expected.to contain_file('/etc/issue').with({
'content' => 'foo',
'owner' => 'root',
@@ -53,6 +75,12 @@ describe 'tripleo::profile::base::sshd' do
context 'with motd configured' do
let(:params) {{ :motd => 'foo' }}
it do
+ is_expected.to contain_class('ssh::server').with({
+ 'storeconfigs_enabled' => false,
+ 'options' => {
+ 'PrintMotd' => 'yes'
+ }
+ })
is_expected.to contain_file('/etc/motd').with({
'content' => 'foo',
'owner' => 'root',
@@ -63,6 +91,94 @@ describe 'tripleo::profile::base::sshd' do
is_expected.to_not contain_file('/etc/issue.net')
end
end
+
+ context 'with options configured' do
+ let(:params) {{ :options => {'X11Forwarding' => 'no'} }}
+ it do
+ is_expected.to contain_class('ssh::server').with({
+ 'storeconfigs_enabled' => false,
+ 'options' => {
+ 'X11Forwarding' => 'no'
+ }
+ })
+ is_expected.to_not contain_file('/etc/motd')
+ is_expected.to_not contain_file('/etc/issue')
+ is_expected.to_not contain_file('/etc/issue.net')
+ end
+ end
+
+ context 'with motd and issue configured' do
+ let(:params) {{
+ :bannertext => 'foo',
+ :motd => 'foo'
+ }}
+ it do
+ is_expected.to contain_class('ssh::server').with({
+ 'storeconfigs_enabled' => false,
+ 'options' => {
+ 'Banner' => '/etc/issue.net',
+ 'PrintMotd' => 'yes'
+ }
+ })
+ is_expected.to contain_file('/etc/motd').with({
+ 'content' => 'foo',
+ 'owner' => 'root',
+ 'group' => 'root',
+ 'mode' => '0644',
+ })
+ is_expected.to contain_file('/etc/issue').with({
+ 'content' => 'foo',
+ 'owner' => 'root',
+ 'group' => 'root',
+ 'mode' => '0644',
+ })
+ is_expected.to contain_file('/etc/issue.net').with({
+ 'content' => 'foo',
+ 'owner' => 'root',
+ 'group' => 'root',
+ 'mode' => '0644',
+ })
+ end
+ end
+
+ context 'with motd and issue and options configured' do
+ let(:params) {{
+ :bannertext => 'foo',
+ :motd => 'foo',
+ :options => {
+ 'PrintMotd' => 'no', # this should be overridden
+ 'X11Forwarding' => 'no'
+ }
+ }}
+ it do
+ is_expected.to contain_class('ssh::server').with({
+ 'storeconfigs_enabled' => false,
+ 'options' => {
+ 'Banner' => '/etc/issue.net',
+ 'PrintMotd' => 'yes',
+ 'X11Forwarding' => 'no'
+ }
+ })
+ is_expected.to contain_file('/etc/motd').with({
+ 'content' => 'foo',
+ 'owner' => 'root',
+ 'group' => 'root',
+ 'mode' => '0644',
+ })
+ is_expected.to contain_file('/etc/issue').with({
+ 'content' => 'foo',
+ 'owner' => 'root',
+ 'group' => 'root',
+ 'mode' => '0644',
+ })
+ is_expected.to contain_file('/etc/issue.net').with({
+ 'content' => 'foo',
+ 'owner' => 'root',
+ 'group' => 'root',
+ 'mode' => '0644',
+ })
+ end
+ end
end
on_supported_os.each do |os, facts|