theforeman / puppet-foreman_proxy

Puppet module for Foreman Smart Proxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate declaration: File[/etc/sudoers.d]

beetlebolt opened this issue · comments

I have a conflict with the saz/sudo module v4.2.0. which is also declaring File[/etc/sudoers.d].
Full error:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: File[/etc/sudoers.d] is already declared in file /etc/puppetlabs/code/environments/development/modules/sudo/manifests/init.pp:147; cannot redeclare at /etc/puppetlabs/code/environments/development/modules/foreman_proxy/manifests/config.pp:119 at /etc/puppetlabs/code/environments/development/modules/foreman_proxy/manifests/config.pp:119:9 on node mycomputer

Set manage_sudoersd => false. See

# $manage_sudoersd:: Whether to manage File['/etc/sudoers.d'] or not. When reusing this module, this may be
# disabled to let a dedicated sudo module manage it instead.

Whether to manage File['/etc/sudoers.d'] or not. When reusing this module, this may be disabled to let a dedicated sudo module manage it instead.

As @alexjfisher said: there's a boolean for this. I submitted a PR to use ensure_resource which should decrease the chance of needing this boolean altogether.