Comments (12)
Hi,
I tried with the following:
Vagrant Box with Ubuntu 16.04
Puppet 4.8.1
sudo version 4.1.0
sudo.yaml
---
classes:
- sudo
sudo:
ensure: present
sudo::configs:
'ubuntu_admin':
content: "ubuntu ALL=(ALL) NOPASSWD: ALL"
priority: 10
default.pp
include ::sudo
include ::sudo::configs
Result:
The sudoers file does not get overwritten and the configs are not included.
With the modification from above it does work:
$configs = lookup('sudo::configs', Hash, {"strategy" => "deep", "merge_hash_arrays" => true}, $configs_hash)
Greetings
Jan
from puppet-sudo.
I am having the same issue
the variables to replace the file are set correctly:
- $file_ensure: present
- $config_file_group: root
- $config_file_replace: true
- $source: puppet:///modules/sudo/filessudoers.ubuntu
from puppet-sudo.
Hi,
the problem ist in the config.pp
$configs = hiera_hash('sudo::configs', $configs_hash)
Hiera with puppet 4 now uses lookup
new example with deep merge:
$configs = lookup('sudo::configs', Hash, {"strategy" => "deep", "merge_hash_arrays" => true}, $configs_hash)
Greetings Jan
from puppet-sudo.
I am also having this same issue
from puppet-sudo.
Can you try it with the newest release, if this is still happening for you?
from puppet-sudo.
Any news on this?
from puppet-sudo.
I think I can try it today and give u some feedback
from puppet-sudo.
hi ... which version do you mean?
works for me:
root@tp64:/home/ubuntu# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
ubuntu@tp64:~$ puppet agent --version
4.10.0
root@tp64:/home/ubuntu# cat /etc/sudoers.d/10_ubuntu_admin
ubuntu ALL=(ALL) NOPASSWD: ALL
from puppet-sudo.
Tested with module version 4.10
from puppet-sudo.
Hi @hboetes ,
/etc/sudoers is replaced for me too.
root@tp64:/home/ubuntu# cat /etc/sudoers
# file managed by puppet (unless config_file_replace=false)
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
==> default: Notice: /Stage[main]/Sudo/File[/etc/sudoers]/content: content changed '{md5}e8e73f16ed73309df7574c12fbcc0af7' to '{md5}96d9cd290b72e37c1079aa2b4469491a'
Greetings Jan
from puppet-sudo.
Hi,
I only use the hiera lookup as seen above with:
include ::sudo
include ::sudo::configs
Every change in the template file results in a new sudoers files. From my side with the pull request everything ist ok. Could you test it with a hiera lookup?
Greeting Jan
from puppet-sudo.
Please give the current master a try
from puppet-sudo.
Related Issues (20)
- unable to use hiera.yaml with module profile HOT 4
- is this still maintained HOT 4
- Facter error on Windows HOT 3
- Module fails with resolving custom fact "sudoversion" HOT 3
- Group names with space HOT 6
- Dependency pinning resolves version 4.1.0 with new stdlib version 7.0.0 HOT 2
- update ::sudoversion to facts hash HOT 3
- Release 6.0.1? HOT 1
- Bump required stdlib version to <8.0.0 HOT 1
- sudo::content parameter is poorly named HOT 2
- Puppetlabs stdlib 8.x.x support
- wheel_config defaulting to 'absent' is undesirable, change to 'password' HOT 3
- 'versioncmp' parameter 'a' expects a String value, got Undef HOT 7
- Add ability to set passprompt or not mange main config file/package HOT 3
- Upgrade to Hiera 5 HOT 2
- Not All Files in /etc/sudoers.d Getting Purged HOT 10
- Publish new version to forge
- sudo::purge_ignore: '*[!_puppet]' erase more then *_puppet HOT 1
- stdlib 9.x.x compat HOT 1
- secure_path in params.pp set to incorrect defaults for recent Redhat releases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-sudo.