Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose fpm user and group #327

Merged
merged 1 commit into from
Mar 16, 2017
Merged

Conversation

spacepants
Copy link
Contributor

Hey there,

The fpm user and group are not currently overridable outside of Hiera. This propagates the fpm user and group similarly to log_owner and log_group.

Redhat systems default the user to apache, but we're using nginx.

Let me know if this needs anything else. Thanks!

@roidelapluie
Copy link
Member

Can you please add doc and tests? Sounds important in this PR.

@roidelapluie
Copy link
Member

Sorry, rubocop is not happy yet :(

let(:params) { { fpm_user: 'nginx' } }
it { is_expected.to contain_class('php::fpm').with(user: 'nginx') }
it { is_expected.to contain_php__fpm__pool('www').with(user: 'nginx') }
# rubocop:disable RSpec/RepeatedExample
Copy link
Member

@roidelapluie roidelapluie Mar 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you could instead do:

dstfile = case facts[:operatingsystem]
when 'Ubuntu'
  '/etc/php5/fpm/pool.d/www.conf'
when 'os2'
 '.etc//c/c/c/c/'
end

it { is_expected.to contain_file(dstfile).with_content(/user = nginx/) }

@roidelapluie
Copy link
Member

Thank you!

motivator pushed a commit to bigcommerce/puppet-php that referenced this pull request Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants