diff --git a/deployment/puppet/cluster/manifests/rabbitmq_fence.pp b/deployment/puppet/cluster/manifests/rabbitmq_fence.pp index be86af913c..c3aa8b5da0 100644 --- a/deployment/puppet/cluster/manifests/rabbitmq_fence.pp +++ b/deployment/puppet/cluster/manifests/rabbitmq_fence.pp @@ -78,28 +78,26 @@ class cluster::rabbitmq_fence( require => Package['rabbitmq-server'], } - if $::osfamily == 'Debian' and $::operatingsystemrelease =~ /^14/ { - Exec { - path => [ '/bin', '/usr/bin' ], - before => Service['corosync-notifyd'], - } + Exec { + path => [ '/bin', '/usr/bin' ], + before => Service['corosync-notifyd'], + } - exec { 'enable_corosync_notifyd': - command => 'sed -i s/START=no/START=yes/ /etc/default/corosync-notifyd', - unless => 'grep START=yes /etc/default/corosync-notifyd', - } + exec { 'enable_corosync_notifyd': + command => 'sed -i s/START=no/START=yes/ /etc/default/corosync-notifyd', + unless => 'grep START=yes /etc/default/corosync-notifyd', + } - #https://bugs.launchpad.net/ubuntu/+source/corosync/+bug/1437368 - #FIXME(bogdando) remove these hacks after switched to systemd service.units - exec { 'fix_corosync_notifyd_init_args': - command => 'sed -i s/DAEMON_ARGS=\"\"/DAEMON_ARGS=\"-d\"/ /etc/init.d/corosync-notifyd', - onlyif => 'grep \'DAEMON_ARGS=""\' /etc/init.d/corosync-notifyd', - } + #https://bugs.launchpad.net/ubuntu/+source/corosync/+bug/1437368 + #FIXME(bogdando) remove these hacks after switched to systemd service.units + exec { 'fix_corosync_notifyd_init_args': + command => 'sed -i s/DAEMON_ARGS=\"\"/DAEMON_ARGS=\"-d\"/ /etc/init.d/corosync-notifyd', + onlyif => 'grep \'DAEMON_ARGS=""\' /etc/init.d/corosync-notifyd', + } - #https://bugs.launchpad.net/ubuntu/+source/corosync/+bug/1437359 - exec { 'fix_corosync_notifyd_init_pidfile': - command => 'sed -i \'/PIDFILE=\/var\/run\/corosync.pid/d\' /etc/init.d/corosync-notifyd', - onlyif => 'grep \'PIDFILE=/var/run/corosync.pid\' /etc/init.d/corosync-notifyd', - } + #https://bugs.launchpad.net/ubuntu/+source/corosync/+bug/1437359 + exec { 'fix_corosync_notifyd_init_pidfile': + command => 'sed -i \'/PIDFILE=\/var\/run\/corosync.pid/d\' /etc/init.d/corosync-notifyd', + onlyif => 'grep \'PIDFILE=/var/run/corosync.pid\' /etc/init.d/corosync-notifyd', } } diff --git a/deployment/puppet/cluster/spec/spec_helper.rb b/deployment/puppet/cluster/spec/spec_helper.rb index a9097a1bfd..8848720fa1 100644 --- a/deployment/puppet/cluster/spec/spec_helper.rb +++ b/deployment/puppet/cluster/spec/spec_helper.rb @@ -18,7 +18,7 @@ def supported_os }, { 'operatingsystem' => 'Ubuntu', - 'operatingsystemrelease' => ['14.04', '16.04'], + 'operatingsystemrelease' => ['16.04'], }, ] end diff --git a/deployment/puppet/cobbler/manifests/packages.pp b/deployment/puppet/cobbler/manifests/packages.pp index 267c18c4b1..d173beb65b 100644 --- a/deployment/puppet/cobbler/manifests/packages.pp +++ b/deployment/puppet/cobbler/manifests/packages.pp @@ -17,20 +17,13 @@ class cobbler::packages { case $::operatingsystem { /(?i)(centos|redhat)/: { - $cobbler_package = 'cobbler' - $cobbler_web_package = 'cobbler-web' - $dnsmasq_package = 'dnsmasq' - $django_package = 'python-django' - $openssh_package = 'openssh-clients' - $pexpect_package = 'pexpect' - case $::operatingsystemrelease { - /6.+/: { - $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents', 'bind-utils'] - } - /7.+/: { - $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents-all', 'bind-utils'] - } - } + $cobbler_package = 'cobbler' + $cobbler_web_package = 'cobbler-web' + $dnsmasq_package = 'dnsmasq' + $django_package = 'python-django' + $openssh_package = 'openssh-clients' + $pexpect_package = 'pexpect' + $cobbler_additional_packages = ['xinetd', 'tftp-server', 'syslinux', 'wget', 'python-ipaddr','fence-agents-all', 'bind-utils'] } /(?i)(debian|ubuntu)/: { $cobbler_package = 'cobbler' @@ -42,6 +35,9 @@ class cobbler::packages { $openssh_package = 'openssh-client' $pexpect_package = 'python-pexpect' } + default: { + fail("Unsupported operatingsystem: ${::operatingsystem}, module ${module_name} only support CentOS/RedHat and Ubuntu/Debian") + } } ensure_packages($cobbler_additional_packages) diff --git a/deployment/puppet/cobbler/spec/spec_helper.rb b/deployment/puppet/cobbler/spec/spec_helper.rb index 1a6520fb2b..5887956638 100644 --- a/deployment/puppet/cobbler/spec/spec_helper.rb +++ b/deployment/puppet/cobbler/spec/spec_helper.rb @@ -25,7 +25,7 @@ def supported_os }, { 'operatingsystem' => 'Ubuntu', - 'operatingsystemrelease' => ['14.04'], + 'operatingsystemrelease' => ['16.04'], }, ] end diff --git a/deployment/puppet/fuel/files/cobbler/fence_ssh.centos6.py b/deployment/puppet/fuel/files/cobbler/fence_ssh.centos6.py deleted file mode 100644 index 4f5d3b8152..0000000000 --- a/deployment/puppet/fuel/files/cobbler/fence_ssh.centos6.py +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/python - -import atexit -import exceptions -import pexpect -import sys -import time - -sys.path.append("/usr/share/fence") -from fencing import all_opt -from fencing import atexit_handler -from fencing import check_input -from fencing import fence_action -from fencing import fence_login -from fencing import process_input -from fencing import show_docs - -# BEGIN_VERSION_GENERATION -RELEASE_VERSION = "0.1.0" -BUILD_DATE = "(built Wed Oct 31 11:20:18 UTC 2012)" -MIRANTIS_COPYRIGHT = "Copyright (C) Mirantis, Inc. 2012 All rights reserved." -# END_VERSION_GENERATION - - -def get_power_status(conn, options): - try: - conn.sendline("/bin/echo 1") - conn.log_expect(options, options["-c"], int(options["-Y"])) - except Exception: - return "off" - return "on" - - -def set_power_status(conn, options): - if options["-o"] == "off": - try: - conn.sendline("sh -c '(sleep 1;/sbin/reboot -f)' &>/dev/null &") - conn.log_expect(options, options["-c"], int(options["-g"])) - time.sleep(2) - except Exception: - pass - - -def main(): - device_opt = ["help", "version", "agent", "quiet", "verbose", "debug", - "action", "ipaddr", "login", "passwd", "passwd_script", - "secure", "identity_file", "test", "port", "separator", - "inet4_only", "inet6_only", "ipport", - "power_timeout", "shell_timeout", - "login_timeout", "power_wait"] - - atexit.register(atexit_handler) - - all_opt["login_timeout"]["default"] = 60 - - pinput = process_input(device_opt) - - # use ssh to manipulate node - pinput["-x"] = 1 - - options = check_input(device_opt, pinput) - - if options["-o"] != "off": - sys.exit(0) - - options["-c"] = "\[EXPECT\]#\ " - - # this string will be appended to the end of ssh command - strict = "-t -o 'StrictHostKeyChecking=no'" - serveralive = "-o 'ServerAliveInterval 2'" - no_stdin = "-n" - bash = "/bin/bash --noprofile --norc" - options["ssh_options"] = "{0} {1} {2} '/bin/bash -c " \ - "\"PS1={3} {4}\"'".format( - strict, serveralive, no_stdin, options["-c"], - bash) - options["-X"] = "{0} {1} {2} '/bin/bash -c " \ - "\"PS1={3} {4}\"'".format( - strict, serveralive, no_stdin, options["-c"], bash) - - docs = {} - docs["shortdesc"] = "Fence agent that can just reboot node via ssh" - docs["longdesc"] = "fence_ssh is an I/O Fencing agent \ -which can be used to reboot nodes via ssh." - show_docs(options, docs) - - # Operate the fencing device - - # this method will actually launch ssh command - conn = fence_login(options) - - result = fence_action(conn, options, set_power_status, - get_power_status, None) - - try: - conn.close() - except exceptions.OSError: - pass - except pexpect.ExceptionPexpect: - pass - - sys.exit(result) -if __name__ == "__main__": - main() diff --git a/deployment/puppet/fuel/manifests/cobbler.pp b/deployment/puppet/fuel/manifests/cobbler.pp index 3c2c35723a..ea312dadd0 100644 --- a/deployment/puppet/fuel/manifests/cobbler.pp +++ b/deployment/puppet/fuel/manifests/cobbler.pp @@ -32,19 +32,7 @@ class fuel::cobbler( $real_server = $next_server - if $::osfamily == 'RedHat' { - case $operatingsystemmajrelease { - '6': { - $fence_ssh_source = 'puppet:///modules/fuel/cobbler/fence_ssh.centos6.py' - } - '7': { - $fence_ssh_source = 'puppet:///modules/fuel/cobbler/fence_ssh.centos7.py' - } - default: { - $fence_ssh_source = 'puppet:///modules/fuel/cobbler/fence_ssh.centos6.py' - } - } - } + $fence_ssh_source = 'puppet:///modules/fuel/cobbler/fence_ssh.centos7.py' class { '::cobbler': server => $server, diff --git a/deployment/puppet/fuel/manifests/mcollective.pp b/deployment/puppet/fuel/manifests/mcollective.pp index 622d442173..5dc534f9ac 100644 --- a/deployment/puppet/fuel/manifests/mcollective.pp +++ b/deployment/puppet/fuel/manifests/mcollective.pp @@ -41,24 +41,9 @@ class fuel::mcollective( } } - if $::osfamily == 'RedHat' { - case $operatingsystemmajrelease { - '6': { - $mco_packages = ['ruby21-rubygem-mcollective-client', - 'ruby21-nailgun-mcagents'] - } - '7': { - $mco_packages = ['mcollective-client', - 'rubygem-mcollective-client', - 'nailgun-mcagents'] - } - default: { - fail("Unsupported ${::osfamily} release: ${::operatingsystemmajrelease}") - } - } - } - + $mco_packages = ['mcollective-client', 'rubygem-mcollective-client', 'nailgun-mcagents'] ensure_packages($mco_packages) + ensure_packages($mco_packages_extra) class { '::mcollective': diff --git a/deployment/puppet/fuel/spec/classes/fuel_keystone_spec.rb b/deployment/puppet/fuel/spec/classes/fuel_keystone_spec.rb index 1ed0ec404a..51e5a29395 100644 --- a/deployment/puppet/fuel/spec/classes/fuel_keystone_spec.rb +++ b/deployment/puppet/fuel/spec/classes/fuel_keystone_spec.rb @@ -38,7 +38,6 @@ describe "fuel::keystone" do :priority => '05', :threads => 3, :vhost_custom_fragment => 'LimitRequestFieldSize 81900', - :workers => 1, :access_log_format => 'forwarded', ) end @@ -47,11 +46,16 @@ describe "fuel::keystone" do end - on_supported_os(supported_os: supported_os).each do |os, facts| - context "on #{os}" do - let(:facts) { facts.merge!(@default_facts) } - it_configures "keystone configuration" + context 'on RedHat platforms' do + let :facts do + @default_facts.merge({ + :osfamily => 'RedHat', + :operatingsystem => 'CentOS', + :operatingsystemrelease => '7.0', + :puppetversion => Puppet.version, + }) end + it_configures "keystone configuration" end end diff --git a/deployment/puppet/fuel/spec/spec_helper.rb b/deployment/puppet/fuel/spec/spec_helper.rb index 255342c74e..f9e2190618 100644 --- a/deployment/puppet/fuel/spec/spec_helper.rb +++ b/deployment/puppet/fuel/spec/spec_helper.rb @@ -18,7 +18,7 @@ def supported_os { 'operatingsystem' => 'CentOS', 'operatingsystemrelease' => [ '7.0' ] }, { 'operatingsystem' => 'Ubuntu', - 'operatingsystemrelease' => [ '14.04' ] } + 'operatingsystemrelease' => [ '16.04' ] } ] end diff --git a/deployment/puppet/l23network/manifests/params.pp b/deployment/puppet/l23network/manifests/params.pp index c0af4de114..8fa17eb8fa 100644 --- a/deployment/puppet/l23network/manifests/params.pp +++ b/deployment/puppet/l23network/manifests/params.pp @@ -14,10 +14,7 @@ class l23network::params { $lnx_bond_tools = 'ifenslave' $lnx_ethernet_tools = 'ethtool' $lnx_bridge_tools = 'bridge-utils' - $ovs_datapath_package_name = $::operatingsystemmajrelease ? { - /^14\./ =>'openvswitch-datapath-dkms', - default => undef - } + $ovs_datapath_package_name = undef $ovs_common_package_name = 'openvswitch-switch' $ovs_dpdk_package_name = 'openvswitch-switch-dpdk' $ovs_dpdk_dkms_package_name = 'dpdk-dkms' @@ -81,7 +78,7 @@ class l23network::params { $ovs_memory_channels = undef } default: { - fail("Unsupported OS: ${l23_os}/${::operatingsystem}") + fail("Unsupported OS: ${::l23_os}/${::operatingsystem}") } } } diff --git a/deployment/puppet/l23network/spec/classes/l2__spec.rb b/deployment/puppet/l23network/spec/classes/l2__spec.rb index 9a8b085f1d..651e5b04f8 100644 --- a/deployment/puppet/l23network/spec/classes/l2__spec.rb +++ b/deployment/puppet/l23network/spec/classes/l2__spec.rb @@ -149,138 +149,6 @@ describe 'l23network::l2' do end - context 'Ubuntu-14.04' do - let (:facts) do - { :l23_os => 'ubuntu', - :l3_fqdn_hostname => 'my_name', - :operatingsystemmajrelease => '14.04' - } - end - - let :pre_condition do - 'K_mod <| |>' - end - - puppet_debug_override - - context 'with a default params' do - let :params do - { - :modprobe_bonding => true, - :modprobe_8021q => true, - :modprobe_bridge => true, - } - end - - it { should compile.with_all_deps } - - it { should_not contain_package('openvswitch-datapath') } - - it { should_not contain_package('openvswitch-common') } - - it { should_not contain_package('openvswitch-dpdk').with_name('openvswitch-switch-dpdk') } - - it { should_not contain_service('openvswitch-service') } - - it { should_not contain_service('dpdk') } - - it { should_not contain_k_mod('openvswitch').with_ensure('present') } - - it { should contain_k_mod('bonding') } - it { should contain_k_mod('8021q') } - it { should contain_k_mod('bridge') } - - end - - context 'use_ovs with default parameters' do - - let :params do - { :ensure_package => 'present', - :use_lnx => true, - :use_ovs => true, - } - end - - it { should compile.with_all_deps } - - it { should contain_package('openvswitch-datapath').with_name('openvswitch-datapath-dkms') } - it { should contain_package('openvswitch-datapath').that_comes_before('Service[openvswitch-service]') } - - it { should contain_package('openvswitch-common').with_name('openvswitch-switch') } - it { should contain_package('openvswitch-common').that_notifies('Service[openvswitch-service]') } - - it { should contain_service('openvswitch-service') } - - it { should contain_k_mod('openvswitch').with_ensure('present') } - - end - - context 'use_ovs and custom ovs_datapath_package_name and custom ovs_module_name and ovs_common_package_name' do - - let :params do - { :ensure_package => 'present', - :use_lnx => true, - :use_ovs => true, - :ovs_module_name => 'custom_ovs_module_name', - :ovs_datapath_package_name => 'custom_ovs_datapath_package_name', - :ovs_common_package_name => 'test_ovs_common_package_name', - } - end - - it { should compile.with_all_deps } - - it { should contain_package('openvswitch-datapath').with_name('custom_ovs_datapath_package_name') } - it { should contain_package('openvswitch-datapath').that_comes_before('Service[openvswitch-service]') } - - it { should contain_package('openvswitch-common').with_name('test_ovs_common_package_name') } - - it { should contain_package('openvswitch-common').that_notifies('Service[openvswitch-service]') } - - it { should contain_service('openvswitch-service') } - - it { should contain_k_mod('custom_ovs_module_name').with_ensure('present') } - - end - - context 'use_ovs, use_dpdk with default parameters' do - - let :params do - { :ensure_package => 'present', - :use_lnx => true, - :use_ovs => true, - :use_dpdk => true, - } - end - - it { should compile.with_all_deps } - - it { should contain_package('openvswitch-datapath').with_name('openvswitch-datapath-dkms') } - it { should contain_package('openvswitch-datapath').that_comes_before('Service[openvswitch-service]') } - - it { should contain_package('openvswitch-common').with_name('openvswitch-switch') } - it { should contain_package('openvswitch-common').that_notifies('Service[openvswitch-service]') } - - it { should contain_package('dpdk-dkms').with_name('dpdk-dkms') } - it { should contain_package('dpdk-dkms').that_comes_before('Service[dpdk]') } - - it { should contain_file('/etc/dpdk/interfaces').that_comes_before('File[/etc/default/openvswitch-switch]') } - it { should contain_file('/etc/dpdk/interfaces').that_notifies('Service[dpdk]') } - it { should contain_file('/etc/dpdk/interfaces').that_notifies('Service[openvswitch-service]') } - - it { should contain_package('openvswitch-dpdk').with_name('openvswitch-switch-dpdk') } - it { should contain_package('openvswitch-dpdk').that_notifies('Service[openvswitch-service]') } - it { should contain_package('openvswitch-dpdk').that_comes_before('File[/etc/default/openvswitch-switch]') } - - it { should contain_file('/etc/default/openvswitch-switch').that_notifies('Service[openvswitch-service]') } - - it { should contain_service('openvswitch-service') } - - it { should contain_k_mod('openvswitch').with_ensure('present') } - - end - - end - context 'Ubuntu-16.04' do let (:facts) do { :l23_os => 'ubuntu', diff --git a/deployment/puppet/merge_yaml/spec/spec_helper.rb b/deployment/puppet/merge_yaml/spec/spec_helper.rb index 00a11af7c7..14bbcd8440 100644 --- a/deployment/puppet/merge_yaml/spec/spec_helper.rb +++ b/deployment/puppet/merge_yaml/spec/spec_helper.rb @@ -11,7 +11,7 @@ def supported_os }, { 'operatingsystem' => 'Ubuntu', - 'operatingsystemrelease' => ['14.04', '16.04'], + 'operatingsystemrelease' => ['16.04'], }, ] end diff --git a/deployment/puppet/openstack/manifests/galera/client.pp b/deployment/puppet/openstack/manifests/galera/client.pp index 9ba87967a9..3e477edb79 100644 --- a/deployment/puppet/openstack/manifests/galera/client.pp +++ b/deployment/puppet/openstack/manifests/galera/client.pp @@ -63,14 +63,7 @@ class openstack::galera::client ( $mysql_client_name = 'MySQL-client-wsrep' } 'Debian': { - # TODO(dmburmistrov): after dropping trusty support - # remove this if, only 'mysql-wsrep-client-5.6' should - # be preserved - if $::operatingsystemrelease =~ /^14/ { - $mysql_client_name = 'mysql-client-5.6' - } else { - $mysql_client_name = 'mysql-wsrep-client-5.6' - } + $mysql_client_name = 'mysql-wsrep-client-5.6' } default: { fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian") diff --git a/deployment/puppet/openstack/spec/classes/openstack_galera_client_spec.rb b/deployment/puppet/openstack/spec/classes/openstack_galera_client_spec.rb index 894f951f47..eddc672333 100644 --- a/deployment/puppet/openstack/spec/classes/openstack_galera_client_spec.rb +++ b/deployment/puppet/openstack/spec/classes/openstack_galera_client_spec.rb @@ -7,11 +7,7 @@ describe 'openstack::galera::client' do let(:mysql_client_name) do case facts[:osfamily] when 'Debian' - if facts[:operatingsystemrelease] =~ /^14/ - 'mysql-client-5.6' - else - 'mysql-wsrep-client-5.6' - end + 'mysql-wsrep-client-5.6' when 'RedHat' 'MySQL-client-wsrep' else diff --git a/deployment/puppet/openstack/spec/spec_helper.rb b/deployment/puppet/openstack/spec/spec_helper.rb index c5ad568a4a..ec3a8fb2ea 100644 --- a/deployment/puppet/openstack/spec/spec_helper.rb +++ b/deployment/puppet/openstack/spec/spec_helper.rb @@ -18,7 +18,7 @@ def supported_os }, { 'operatingsystem' => 'Ubuntu', - 'operatingsystemrelease' => ['14.04', '16.04'], + 'operatingsystemrelease' => ['16.04'], }, ] end diff --git a/deployment/puppet/openstack_tasks/manifests/openstack_network/compute_nova.pp b/deployment/puppet/openstack_tasks/manifests/openstack_network/compute_nova.pp index d768561e39..7eb4c47f1f 100644 --- a/deployment/puppet/openstack_tasks/manifests/openstack_network/compute_nova.pp +++ b/deployment/puppet/openstack_tasks/manifests/openstack_network/compute_nova.pp @@ -31,17 +31,10 @@ class openstack_tasks::openstack_network::compute_nova { $nova_migration_ip = get_network_role_property('nova/migration', 'ipaddr') - if $::operatingsystemmajrelease == '16.04' { - # This override is required only for 16.04 Ubuntu because we are using UCA libvirt package. - $libvirt_service_name = 'libvirt-bin' - } else { - $libvirt_service_name = $::nova::params::libvirt_service_name - } - service { 'libvirt' : ensure => 'running', enable => true, - name => $libvirt_service_name, + name => 'libvirt-bin', provider => $::nova::params::special_service_provider, } diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp index b7c94cd556..0e970e3ab4 100644 --- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp +++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp @@ -376,17 +376,6 @@ class openstack_tasks::roles::compute { $disk_cachemodes = ['"file=directsync,block=none"'] } - if $::operatingsystemmajrelease == '16.04' { - # This override is required only for 16.04 Ubuntu because we are using UCA libvirt package. - $libvirt_service_name = 'libvirt-bin' - $virtlock_service_name = 'virtlockd' - $virtlog_service_name = 'virtlogd' - } else { - $libvirt_service_name = $::nova::params::libvirt_service_name - $virtlock_service_name = $::nova::params::virtlock_service_name - $virtlog_service_name = $::nova::params::virtlog_service_name - } - # Configure libvirt for nova-compute class { '::nova::compute::libvirt': libvirt_virt_type => $libvirt_type, @@ -395,9 +384,9 @@ class openstack_tasks::roles::compute { libvirt_inject_partition => $libvirt_inject_partition, vncserver_listen => '0.0.0.0', remove_unused_original_minimum_age_seconds => pick($nova_hash_real['remove_unused_original_minimum_age_seconds'], '86400'), - libvirt_service_name => $libvirt_service_name, - virtlock_service_name => $virtlock_service_name, - virtlog_service_name => $virtlog_service_name, + libvirt_service_name => 'libvirt-bin', + virtlock_service_name => 'virtlockd', + virtlog_service_name => 'virtlogd', } class { '::nova::migration::libvirt': diff --git a/deployment/puppet/openstack_tasks/manifests/roles/ironic_conductor.pp b/deployment/puppet/openstack_tasks/manifests/roles/ironic_conductor.pp index ccc7a8db1d..a0aab51a62 100644 --- a/deployment/puppet/openstack_tasks/manifests/roles/ironic_conductor.pp +++ b/deployment/puppet/openstack_tasks/manifests/roles/ironic_conductor.pp @@ -124,25 +124,18 @@ class openstack_tasks::roles::ironic_conductor { require => Class['::ironic'], } - if $::operatingsystemmajrelease == '16.04' { - $pxelinux_source = '/usr/lib/PXELINUX/pxelinux.0' - $pxelinux_package = ['syslinux', 'pxelinux'] - # TODO(vsaienko) remove provider hack when puppetlabs-tftp fixed issue with - # default provider. - Service <| title == 'tftpd-hpa' |> { provider => 'systemd'} - } else { - $pxelinux_source = '/usr/lib/syslinux/pxelinux.0' - $pxelinux_package = 'syslinux' - } + # TODO(vsaienko) remove provider hack when puppetlabs-tftp fixed issue with + # default provider. + Service <| title == 'tftpd-hpa' |> { provider => 'systemd'} - package { $pxelinux_package: + ensure_packages(['syslinux', 'pxelinux'], { ensure => 'present', before => File["${tftp_root}/pxelinux.0"] - } + }) file { "${tftp_root}/pxelinux.0": - ensure => present, - source => $pxelinux_source, + ensure => present, + source => '/usr/lib/PXELINUX/pxelinux.0', } file { "${tftp_root}/map-file": diff --git a/deployment/puppet/osnailyfacter/manifests/ceph_nova_compute.pp b/deployment/puppet/osnailyfacter/manifests/ceph_nova_compute.pp index 59355aa770..1451f9ce79 100644 --- a/deployment/puppet/osnailyfacter/manifests/ceph_nova_compute.pp +++ b/deployment/puppet/osnailyfacter/manifests/ceph_nova_compute.pp @@ -24,16 +24,9 @@ class osnailyfacter::ceph_nova_compute ( content => template('osnailyfacter/ceph_secret.erb') } - if ($::operatingsystem == 'Ubuntu') and ($::operatingsystemrelease =~ /^16/) { - # This override is required only for 16.04 Ubuntu because we are using UCA libvirt package. - $libvirt_service_name = 'libvirt-bin' - } else { - $libvirt_service_name = $::nova::params::libvirt_service_name - } - ensure_resource('service', 'libvirt', { ensure => 'running', - name => $libvirt_service_name, + name => 'libvirt-bin', }) exec {'Set Ceph RBD secret for Nova': @@ -41,8 +34,8 @@ class osnailyfacter::ceph_nova_compute ( command => "virsh secret-define --file ${secret_xml} && \ virsh secret-set-value --secret ${rbd_secret_uuid} \ --base64 $(ceph auth get-key client.${user})", - path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - unless => "virsh secret-list | fgrep -qw ${rbd_secret_uuid}", + path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + unless => "virsh secret-list | fgrep -qw ${rbd_secret_uuid}", } Nova_config<||> ~> diff --git a/deployment/puppet/osnailyfacter/manifests/database/database.pp b/deployment/puppet/osnailyfacter/manifests/database/database.pp index 3e2cef618a..43d6a5c7fd 100644 --- a/deployment/puppet/osnailyfacter/manifests/database/database.pp +++ b/deployment/puppet/osnailyfacter/manifests/database/database.pp @@ -109,15 +109,8 @@ class osnailyfacter::database::database { $vendor_type = 'MOS' $galera_package_name = 'galera-3' - # TODO(dmburmistrov): after dropping trusty support - # remove this if, only 'mysql-wsrep-*' should be preserved - if $::operatingsystemrelease =~ /^14/ { - $mysql_package_name = 'mysql-server-wsrep-5.6' - $client_package_name = 'mysql-client-5.6' - } else { - $mysql_package_name = 'mysql-wsrep-server-5.6' - $client_package_name = 'mysql-wsrep-client-5.6' - } + $mysql_package_name = 'mysql-wsrep-server-5.6' + $client_package_name = 'mysql-wsrep-client-5.6' $vendor_override_options = { 'mysqld' => { diff --git a/deployment/puppet/osnailyfacter/manifests/generate_vms/generate_vms.pp b/deployment/puppet/osnailyfacter/manifests/generate_vms/generate_vms.pp index dee37f89ca..4cf0d7fbc6 100644 --- a/deployment/puppet/osnailyfacter/manifests/generate_vms/generate_vms.pp +++ b/deployment/puppet/osnailyfacter/manifests/generate_vms/generate_vms.pp @@ -17,14 +17,7 @@ class osnailyfacter::generate_vms::generate_vms { ensure => 'installed', } - if ($::operatingsystem == 'Ubuntu') and ($::operatingsystemrelease =~ /^16/) { - # This override is required only for 16.04 Ubuntu because we are using UCA libvirt package. - $libvirt_service_name = 'libvirt-bin' - } else { - $libvirt_service_name = $::nova::params::libvirt_service_name - } - - service { $libvirt_service_name: + service { 'libvirt-bin': ensure => 'running', require => Package[$packages], before => Exec['generate_vms'], diff --git a/deployment/puppet/osnailyfacter/manifests/globals/globals.pp b/deployment/puppet/osnailyfacter/manifests/globals/globals.pp index 2ea01b8c88..87a4f2cfd4 100644 --- a/deployment/puppet/osnailyfacter/manifests/globals/globals.pp +++ b/deployment/puppet/osnailyfacter/manifests/globals/globals.pp @@ -65,13 +65,11 @@ class osnailyfacter::globals::globals { # TODO (iberezovskiy): Remove this workaround when # https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1570472 is resolved - if $::operatingsystemmajrelease == '16.04' { - file { "${facter_os_package_type_dir}/service_provider.txt": - ensure => 'present', - mode => '0640', - content => 'service_provider=systemd', - require => File[$facter_os_package_type_dir], - } + file { "${facter_os_package_type_dir}/service_provider.txt": + ensure => 'present', + mode => '0640', + content => 'service_provider=systemd', + require => File[$facter_os_package_type_dir], } } diff --git a/deployment/puppet/osnailyfacter/manifests/tools/tools.pp b/deployment/puppet/osnailyfacter/manifests/tools/tools.pp index 4b9e39173a..ca3c0db3e4 100644 --- a/deployment/puppet/osnailyfacter/manifests/tools/tools.pp +++ b/deployment/puppet/osnailyfacter/manifests/tools/tools.pp @@ -21,33 +21,6 @@ class osnailyfacter::tools::tools { class { '::osnailyfacter::ssh': } - #TODO(mmalchuk) the whole block should be removed together with - # the postfix package in the bootsrap after switch to the Xenial - unless (versioncmp($::operatingsystemmajrelease, '16') >= 0) { - - ensure_packages(['postfix']) - - service { 'postfix': - ensure => running, - enable => true, - require => Package['postfix'], - } - - augeas { 'configure postfix': - context => '/files/etc/postfix/main.cf', - changes => [ - "set /files/etc/postfix/main.cf/mydestination ${::fqdn},localhost", - "set /files/etc/postfix/main.cf/myhostname ${::fqdn}", - 'set /files/etc/postfix/main.cf/inet_interfaces loopback-only', - 'set /files/etc/postfix/main.cf/default_transport error', - 'set /files/etc/postfix/main.cf/relay_transport error', - ], - notify => Service['postfix'], - require => Package['postfix'], - } - - } - if $::virtual != 'physical' { class { '::osnailyfacter::acpid': } } diff --git a/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_apache_spec.rb b/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_apache_spec.rb index 999f684e55..bfffdf99e5 100644 --- a/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_apache_spec.rb +++ b/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_apache_spec.rb @@ -5,7 +5,7 @@ describe 'osnailyfacter::apache' do { :osfamily => 'Debian', :operatingsystem => 'Ubuntu', - :operatingsystemrelease => '14.04', + :operatingsystemrelease => '16.04', :concat_basedir => '/var/lib/puppet/concat' } end diff --git a/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_dnsmasq_spec.rb b/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_dnsmasq_spec.rb index e9f52d8026..03fccbddda 100644 --- a/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_dnsmasq_spec.rb +++ b/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_dnsmasq_spec.rb @@ -5,7 +5,7 @@ describe 'osnailyfacter::dnsmasq' do { :osfamily => 'Debian', :operatingsystem => 'Ubuntu', - :operatingsystemrelease => '14.04', + :operatingsystemrelease => '16.04', :concat_basedir => '/var/lib/puppet/concat', :domain => 'example.com' } diff --git a/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_mysql_user_access_spec.rb b/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_mysql_user_access_spec.rb index 7aa0257969..66ad95f83e 100644 --- a/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_mysql_user_access_spec.rb +++ b/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_mysql_user_access_spec.rb @@ -5,7 +5,7 @@ describe 'osnailyfacter::mysql_user_access' do { :osfamily => 'Debian', :operatingsystem => 'Ubuntu', - :operatingsystemrelease => '14.04', + :operatingsystemrelease => '16.04', :concat_basedir => '/var/lib/puppet/concat' } end diff --git a/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_wait_for_nova_backends_spec.rb b/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_wait_for_nova_backends_spec.rb index 5744804743..bb460c5a49 100644 --- a/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_wait_for_nova_backends_spec.rb +++ b/deployment/puppet/osnailyfacter/spec/classes/osnailyfacter_wait_for_nova_backends_spec.rb @@ -5,7 +5,7 @@ describe 'osnailyfacter::wait_for_nova_backends' do { :osfamily => 'Debian', :operatingsystem => 'Ubuntu', - :operatingsystemrelease => '14.04', + :operatingsystemrelease => '16.04', :concat_basedir => '/var/lib/puppet/concat' } end diff --git a/deployment/puppet/osnailyfacter/spec/defines/osnailyfacter_mysql_grant_spec.rb b/deployment/puppet/osnailyfacter/spec/defines/osnailyfacter_mysql_grant_spec.rb index bb7eed14ba..ec8357eeec 100644 --- a/deployment/puppet/osnailyfacter/spec/defines/osnailyfacter_mysql_grant_spec.rb +++ b/deployment/puppet/osnailyfacter/spec/defines/osnailyfacter_mysql_grant_spec.rb @@ -6,7 +6,7 @@ describe 'osnailyfacter::mysql_grant' do { :osfamily => 'Debian', :operatingsystem => 'Ubuntu', - :operatingsystemrelease => '14.04', + :operatingsystemrelease => '16.04', :concat_basedir => '/var/lib/puppet/concat' } end diff --git a/deployment/puppet/osnailyfacter/spec/defines/osnailyfacter_openstack_manage_cinder_types_spec.rb b/deployment/puppet/osnailyfacter/spec/defines/osnailyfacter_openstack_manage_cinder_types_spec.rb index 8761e8ccbd..cf480086aa 100644 --- a/deployment/puppet/osnailyfacter/spec/defines/osnailyfacter_openstack_manage_cinder_types_spec.rb +++ b/deployment/puppet/osnailyfacter/spec/defines/osnailyfacter_openstack_manage_cinder_types_spec.rb @@ -6,7 +6,7 @@ describe 'osnailyfacter::openstack::manage_cinder_types' do { :osfamily => 'Debian', :operatingsystem => 'Ubuntu', - :operatingsystemrelease => '14.04', + :operatingsystemrelease => '16.04', :concat_basedir => '/var/lib/puppet/concat' } end diff --git a/deployment/puppet/osnailyfacter/spec/functions/generate_apt_sources_spec.rb b/deployment/puppet/osnailyfacter/spec/functions/generate_apt_sources_spec.rb index f8fe8f0ba3..3472e061e1 100644 --- a/deployment/puppet/osnailyfacter/spec/functions/generate_apt_sources_spec.rb +++ b/deployment/puppet/osnailyfacter/spec/functions/generate_apt_sources_spec.rb @@ -8,19 +8,19 @@ describe 'generate_apt_sources' do 'section' => 'main universe multiverse', 'uri' => 'http://archive.ubuntu.com/ubuntu/', 'priority' => nil, - 'suite' => 'trusty', + 'suite' => 'xenial', 'type' => 'deb'}, {'name' => 'ubuntu-updates', 'section' => 'main universe multiverse', 'uri' => 'http://archive.ubuntu.com/ubuntu/', 'priority' => nil, - 'suite' => 'trusty-updates', + 'suite' => 'xenial-updates', 'type' => 'deb'}, {'name' => 'ubuntu-security', 'section' => 'main universe multiverse', 'uri' => 'http://archive.ubuntu.com/ubuntu/', 'priority' => nil, - 'suite' => 'trusty-security', + 'suite' => 'xenial-security', 'type' => 'deb'}, ] } @@ -30,19 +30,19 @@ describe 'generate_apt_sources' do 'ubuntu' => { 'repos' => 'main universe multiverse', - 'release' => 'trusty', + 'release' => 'xenial', 'location' => 'http://archive.ubuntu.com/ubuntu/' }, 'ubuntu-updates' => { 'repos' => 'main universe multiverse', - 'release' => 'trusty-updates', + 'release' => 'xenial-updates', 'location' => 'http://archive.ubuntu.com/ubuntu/' }, 'ubuntu-security' => { 'repos' => 'main universe multiverse', - 'release' => 'trusty-security', + 'release' => 'xenial-security', 'location' => 'http://archive.ubuntu.com/ubuntu/' }, } diff --git a/tests/noop/spec/hosts/database/database_spec.rb b/tests/noop/spec/hosts/database/database_spec.rb index 40f329fa20..006923789e 100644 --- a/tests/noop/spec/hosts/database/database_spec.rb +++ b/tests/noop/spec/hosts/database/database_spec.rb @@ -123,19 +123,11 @@ describe manifest do end let(:mysql_client_pkg) do - if facts[:operatingsystemrelease] =~ /^14/ - 'mysql-client-5.6' - else - 'mysql-wsrep-client-5.6' - end + 'mysql-wsrep-client-5.6' end let(:mysql_server_pkg) do - if facts[:operatingsystemrelease] =~ /^14/ - 'mysql-server-wsrep-5.6' - else - 'mysql-wsrep-server-5.6' - end + 'mysql-wsrep-server-5.6' end it 'should contain galera' do diff --git a/tests/noop/spec/hosts/generate_vms/generate_vms_spec.rb b/tests/noop/spec/hosts/generate_vms/generate_vms_spec.rb index c2b7e5bc50..494a6b096f 100644 --- a/tests/noop/spec/hosts/generate_vms/generate_vms_spec.rb +++ b/tests/noop/spec/hosts/generate_vms/generate_vms_spec.rb @@ -45,12 +45,7 @@ describe manifest do end it "should start libvirt service service" do - if facts[:operatingsystem] == 'Ubuntu' and facts[:operatingsystemrelease] =~ /^16/ - libvirt_service = 'libvirt-bin' - else - libvirt_service = 'libvirtd' - end - should contain_service(libvirt_service).with( + should contain_service('libvirt-bin').with( 'ensure' => 'running', 'before' => 'Exec[generate_vms]', ) diff --git a/tests/noop/spec/hosts/glance/db_spec.rb b/tests/noop/spec/hosts/glance/db_spec.rb index 9b9f62638e..a3bb98916e 100644 --- a/tests/noop/spec/hosts/glance/db_spec.rb +++ b/tests/noop/spec/hosts/glance/db_spec.rb @@ -15,11 +15,7 @@ describe manifest do if facts[:osfamily] == 'RedHat' pkg_name = 'MySQL-client-wsrep' elsif facts[:osfamily] == 'Debian' - if facts[:operatingsystemrelease] =~ /^14/ - pkg_name = 'mysql-client-5.6' - else - pkg_name = 'mysql-wsrep-client-5.6' - end + pkg_name = 'mysql-wsrep-client-5.6' end should contain_class('mysql::client').with( 'package_name' => pkg_name, diff --git a/tests/noop/spec/hosts/heat/db_spec.rb b/tests/noop/spec/hosts/heat/db_spec.rb index cb2d6b506d..ec87bd56a1 100644 --- a/tests/noop/spec/hosts/heat/db_spec.rb +++ b/tests/noop/spec/hosts/heat/db_spec.rb @@ -15,11 +15,7 @@ describe manifest do if facts[:osfamily] == 'RedHat' pkg_name = 'MySQL-client-wsrep' elsif facts[:osfamily] == 'Debian' - if facts[:operatingsystemrelease] =~ /^14/ - pkg_name = 'mysql-client-5.6' - else - pkg_name = 'mysql-wsrep-client-5.6' - end + pkg_name = 'mysql-wsrep-client-5.6' end should contain_class('mysql::client').with( 'package_name' => pkg_name, diff --git a/tests/noop/spec/hosts/ironic/db_spec.rb b/tests/noop/spec/hosts/ironic/db_spec.rb index e55f7a2b21..df0f281562 100644 --- a/tests/noop/spec/hosts/ironic/db_spec.rb +++ b/tests/noop/spec/hosts/ironic/db_spec.rb @@ -18,11 +18,7 @@ describe manifest do if facts[:osfamily] == 'RedHat' pkg_name = 'MySQL-client-wsrep' elsif facts[:osfamily] == 'Debian' - if facts[:operatingsystemrelease] =~ /^14/ - pkg_name = 'mysql-client-5.6' - else - pkg_name = 'mysql-wsrep-client-5.6' - end + pkg_name = 'mysql-wsrep-client-5.6' end should contain_class('mysql::client').with( 'package_name' => pkg_name, diff --git a/tests/noop/spec/hosts/keystone/db_spec.rb b/tests/noop/spec/hosts/keystone/db_spec.rb index 1c6f214152..4fb39303da 100644 --- a/tests/noop/spec/hosts/keystone/db_spec.rb +++ b/tests/noop/spec/hosts/keystone/db_spec.rb @@ -15,11 +15,7 @@ describe manifest do if facts[:osfamily] == 'RedHat' pkg_name = 'MySQL-client-wsrep' elsif facts[:osfamily] == 'Debian' - if facts[:operatingsystemrelease] =~ /^14/ - pkg_name = 'mysql-client-5.6' - else - pkg_name = 'mysql-wsrep-client-5.6' - end + pkg_name = 'mysql-wsrep-client-5.6' end should contain_class('mysql::client').with( 'package_name' => pkg_name, diff --git a/tests/noop/spec/hosts/murano/db_spec.rb b/tests/noop/spec/hosts/murano/db_spec.rb index 76ad87ea74..c01e435f97 100644 --- a/tests/noop/spec/hosts/murano/db_spec.rb +++ b/tests/noop/spec/hosts/murano/db_spec.rb @@ -12,11 +12,7 @@ describe manifest do if facts[:osfamily] == 'RedHat' pkg_name = 'MySQL-client-wsrep' elsif facts[:osfamily] == 'Debian' - if facts[:operatingsystemrelease] =~ /^14/ - pkg_name = 'mysql-client-5.6' - else - pkg_name = 'mysql-wsrep-client-5.6' - end + pkg_name = 'mysql-wsrep-client-5.6' end should contain_class('mysql::client').with( 'package_name' => pkg_name, diff --git a/tests/noop/spec/hosts/openstack-cinder/db_spec.rb b/tests/noop/spec/hosts/openstack-cinder/db_spec.rb index 239d87bc68..195631c14d 100644 --- a/tests/noop/spec/hosts/openstack-cinder/db_spec.rb +++ b/tests/noop/spec/hosts/openstack-cinder/db_spec.rb @@ -15,11 +15,7 @@ describe manifest do if facts[:osfamily] == 'RedHat' pkg_name = 'MySQL-client-wsrep' elsif facts[:osfamily] == 'Debian' - if facts[:operatingsystemrelease] =~ /^14/ - pkg_name = 'mysql-client-5.6' - else - pkg_name = 'mysql-wsrep-client-5.6' - end + pkg_name = 'mysql-wsrep-client-5.6' end should contain_class('mysql::client').with( 'package_name' => pkg_name, diff --git a/tests/noop/spec/hosts/openstack-controller/db_spec.rb b/tests/noop/spec/hosts/openstack-controller/db_spec.rb index 322c95ed12..e2feed8261 100644 --- a/tests/noop/spec/hosts/openstack-controller/db_spec.rb +++ b/tests/noop/spec/hosts/openstack-controller/db_spec.rb @@ -19,11 +19,7 @@ describe manifest do if facts[:osfamily] == 'RedHat' pkg_name = 'MySQL-client-wsrep' elsif facts[:osfamily] == 'Debian' - if facts[:operatingsystemrelease] =~ /^14/ - pkg_name = 'mysql-client-5.6' - else - pkg_name = 'mysql-wsrep-client-5.6' - end + pkg_name = 'mysql-wsrep-client-5.6' end should contain_class('mysql::client').with( 'package_name' => pkg_name, diff --git a/tests/noop/spec/hosts/openstack-network/db_spec.rb b/tests/noop/spec/hosts/openstack-network/db_spec.rb index cd5709d70f..12e30e9063 100644 --- a/tests/noop/spec/hosts/openstack-network/db_spec.rb +++ b/tests/noop/spec/hosts/openstack-network/db_spec.rb @@ -11,17 +11,12 @@ describe manifest do neutron_db_user = 'neutron' neutron_db_password = Noop.hiera'neutron_db_password' - neutron_db_dbname = 'neutron' it 'should install proper mysql-client' do if facts[:osfamily] == 'RedHat' pkg_name = 'MySQL-client-wsrep' elsif facts[:osfamily] == 'Debian' - if facts[:operatingsystemrelease] =~ /^14/ - pkg_name = 'mysql-client-5.6' - else - pkg_name = 'mysql-wsrep-client-5.6' - end + pkg_name = 'mysql-wsrep-client-5.6' end should contain_class('mysql::client').with( 'package_name' => pkg_name, diff --git a/tests/noop/spec/hosts/roles/ironic-conductor_spec.rb b/tests/noop/spec/hosts/roles/ironic-conductor_spec.rb index fbce1729dd..7b0288609a 100644 --- a/tests/noop/spec/hosts/roles/ironic-conductor_spec.rb +++ b/tests/noop/spec/hosts/roles/ironic-conductor_spec.rb @@ -93,7 +93,7 @@ describe manifest do it "should create #{tftp_root}/pxelinux.0" do should contain_file("#{tftp_root}/pxelinux.0").with( 'ensure' => 'present', - 'source' => '/usr/lib/syslinux/pxelinux.0' + 'source' => '/usr/lib/PXELINUX/pxelinux.0' ).that_requires('Package[syslinux]') end diff --git a/tests/noop/spec/hosts/sahara/db_spec.rb b/tests/noop/spec/hosts/sahara/db_spec.rb index 928e559685..047c8935d7 100644 --- a/tests/noop/spec/hosts/sahara/db_spec.rb +++ b/tests/noop/spec/hosts/sahara/db_spec.rb @@ -12,11 +12,7 @@ describe manifest do if facts[:osfamily] == 'RedHat' pkg_name = 'MySQL-client-wsrep' elsif facts[:osfamily] == 'Debian' - if facts[:operatingsystemrelease] =~ /^14/ - pkg_name = 'mysql-client-5.6' - else - pkg_name = 'mysql-wsrep-client-5.6' - end + pkg_name = 'mysql-wsrep-client-5.6' end should contain_class('mysql::client').with( 'package_name' => pkg_name, diff --git a/tests/noop/spec/hosts/tools/tools_spec.rb b/tests/noop/spec/hosts/tools/tools_spec.rb index 4bb2e8cb62..9db266d02d 100644 --- a/tests/noop/spec/hosts/tools/tools_spec.rb +++ b/tests/noop/spec/hosts/tools/tools_spec.rb @@ -68,23 +68,6 @@ describe manifest do ) end - it 'should configure postfix with correct settings unless ubuntu xenial' do - unless (Puppet::Util::Package.versioncmp(facts[:operatingsystemmajrelease], '16') >= 0) - should contain_package('postfix') - should contain_service('postfix') - should contain_augeas('configure postfix').with( - 'context' => '/files/etc/postfix/main.cf', - 'changes' => [ - "set /files/etc/postfix/main.cf/mydestination #{facts[:fqdn]},localhost", - "set /files/etc/postfix/main.cf/myhostname #{facts[:fqdn]}", - "set /files/etc/postfix/main.cf/inet_interfaces loopback-only", - "set /files/etc/postfix/main.cf/default_transport error", - "set /files/etc/postfix/main.cf/relay_transport error", - ], - ).that_notifies('Service[postfix]') - end - end - it 'should declare osnailyfacter::acpid on virtual machines' do facts[:virtual] = 'kvm' should contain_class('osnailyfacter::acpid')