indiana-university / puppet-duo_unix

The duo_unix module handles the deployment of duo_unix (login_duo or pam_duo) across a range of Linux distributions.
BSD 3-Clause "New" or "Revised" License
2 stars 14 forks source link

Using ensure => latest throws an error #32

Closed rodehoed closed 1 year ago

rodehoed commented 1 year ago

First of all, thanks for this replacement!

We noticed that when we set ensure to latest (default = present) , the puppet agent will give an error: Error: Failed to apply catalog: Validation of File[/etc/duo/login_duo.conf] failed: You cannot specify more than one of content, source, target (file: /etc/puppetlabs/code/modules/duo_unix/manifests/init.pp, line: 140)

This error is not cause by de Package resource but with the File resource (etc/duo/login_duo.conf) where the same $ensure is used. To my knowledge this cannot work this way.

For now I changed the Package resource to latest by hand.

avitacco commented 1 year ago

Thank you for bringing this to my attention. I have an idea for a fix for this and will work to have a new version released soon.

avitacco commented 1 year ago

I hope I've fixed the issue you were facing. There are now separate *_ensure parameters instead of just one shared one. Thank you @rodehoed for your help in ensuring this module is functional and useful for the community.

rodehoed commented 1 year ago

Hi @avitacco . Wow, you can fix it faster then I can answer :+1: It works as advertised now! Thx