From 679c8a3379bd48f8a293eb7c2ef1b392e3abcb7e Mon Sep 17 00:00:00 2001 From: Drew Fisher Date: Tue, 20 Oct 2015 08:40:56 -0600 Subject: [PATCH] Remove POSIX users, groups, and file modes. This patch removes the File, Group, and User resources of /etc/heat and /etc/heat/heat.conf which should be delivered by packaging tools. These resources (mode, user, and group attributes) could be in conflict with different OS packaging systems which isn't a desired result. Change-Id: I5d49f3fc06df295700377eb66f883c9780959f96 Closes-Bug: #1458915 --- manifests/init.pp | 28 ---------------------------- spec/classes/heat_init_spec.rb | 25 ------------------------- 2 files changed, 53 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 22fd324c..c6e06271 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -317,34 +317,6 @@ class heat( warning('The mysql_module parameter is deprecated. The latest 2.x mysql module will be used.') } - if $package_ensure != 'absent' { - Package['heat-common'] -> User['heat'] - Package['heat-common'] -> Group['heat'] - Package['heat-common'] -> File['/etc/heat/'] - } - - group { 'heat': - ensure => 'present', - name => 'heat', - before => Anchor['heat::install::end'], - } - - user { 'heat': - ensure => 'present', - name => 'heat', - gid => 'heat', - groups => ['heat'], - system => true, - before => Anchor['heat::install::end'], - } - - file { '/etc/heat/': - ensure => directory, - owner => 'heat', - group => 'heat', - mode => '0750', - } - package { 'heat-common': ensure => $package_ensure, name => $::heat::params::common_package_name, diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index b5d2aeb4..c0c8c2bd 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -85,31 +85,6 @@ describe 'heat' do it { is_expected.to contain_class('heat::logging') } it { is_expected.to contain_class('heat::params') } - it 'configures heat group' do - is_expected.to contain_group('heat').with_name('heat') - is_expected.to contain_group('heat').that_requires('Package[heat-common]') - end - - it 'configures heat user' do - is_expected.to contain_user('heat').with( - :name => 'heat', - :gid => 'heat', - :groups => ['heat'], - :system => true, - ) - is_expected.to contain_user('heat').that_requires('Package[heat-common]') - end - - it 'configures heat configuration folder' do - is_expected.to contain_file('/etc/heat/').with( - :ensure => 'directory', - :owner => 'heat', - :group => 'heat', - :mode => '0750', - ) - is_expected.to contain_file('/etc/heat/').that_requires('Package[heat-common]') - end - it 'installs heat common package' do is_expected.to contain_package('heat-common').with( :ensure => 'present',