Skip to content

Commit

Permalink
Merge pull request #12 from hfm/user
Browse files Browse the repository at this point in the history
Set home directory and default shell for proxysql user
  • Loading branch information
hfm committed Sep 14, 2018
2 parents c7a8b8c + 8632d2e commit db90fd7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 6 additions & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@

if $proxysql::owner != 'root' {
user { $proxysql::owner:
ensure => present,
gid => $proxysql::group,
system => true,
ensure => present,
comment => 'ProxySQL',
gid => $proxysql::group,
home => $proxysql::datadir,
shell => '/bin/false',
system => true,
}
}

Expand Down
7 changes: 5 additions & 2 deletions spec/acceptance/proxysql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@

describe user('proxysql') do
it { is_expected.to exist }
it { is_expected.to have_home_directory '/var/lib/proxysql' }
it { is_expected.to have_login_shell '/bin/false' }
it { is_expected.to belong_to_primary_group 'proxysql' }
end

describe user('proxysql') do
it { is_expected.to belong_to_primary_group 'proxysql' }
describe group('proxysql') do
it { is_expected.to exist }
end

describe file('/etc/proxysql.cnf') do
Expand Down

0 comments on commit db90fd7

Please sign in to comment.