Don't create users and rewrite the sudo config in dev environment
It breaks the vagrant user
This commit is contained in:
parent
c64383c2a4
commit
26097197ca
@ -19,23 +19,27 @@ end
|
|||||||
package 'mailutils'
|
package 'mailutils'
|
||||||
package 'mosh'
|
package 'mosh'
|
||||||
|
|
||||||
# Searches data bag "users" for groups attribute "sysadmin".
|
# Don't create users and rewrite the sudo config in development environment.
|
||||||
# Places returned users in Unix group "sysadmin" with GID 2300.
|
# It breaks the vagrant user
|
||||||
users_manage 'sysadmin' do
|
unless node.chef_environment == "development"
|
||||||
|
# Searches data bag "users" for groups attribute "sysadmin".
|
||||||
|
# Places returned users in Unix group "sysadmin" with GID 2300.
|
||||||
|
users_manage 'sysadmin' do
|
||||||
group_id 2300
|
group_id 2300
|
||||||
action [:remove, :create]
|
action [:remove, :create]
|
||||||
end
|
end
|
||||||
|
|
||||||
node.override['authorization']['sudo']['sudoers_defaults'] = [
|
node.override['authorization']['sudo']['sudoers_defaults'] = [
|
||||||
# not default on Ubuntu, explicitely enable. Uses a minimal white list of
|
# not default on Ubuntu, explicitely enable. Uses a minimal white list of
|
||||||
# environment variables
|
# environment variables
|
||||||
'env_reset',
|
'env_reset',
|
||||||
# Send emails on unauthorized attempts
|
# Send emails on unauthorized attempts
|
||||||
'mail_badpass',
|
'mail_badpass',
|
||||||
'secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"',
|
'secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"',
|
||||||
]
|
]
|
||||||
node.override['authorization']['sudo']['passwordless'] = true
|
node.override['authorization']['sudo']['passwordless'] = true
|
||||||
include_recipe 'sudo'
|
include_recipe 'sudo'
|
||||||
|
end
|
||||||
|
|
||||||
include_recipe 'kosmos-postfix'
|
include_recipe 'kosmos-postfix'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user