Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove of entries fails, if more than one target file is used #96

Open
Tuxdiver opened this issue Sep 5, 2024 · 0 comments
Open

Remove of entries fails, if more than one target file is used #96

Tuxdiver opened this issue Sep 5, 2024 · 0 comments

Comments

@Tuxdiver
Copy link

Tuxdiver commented Sep 5, 2024

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7.32.1
  • Ruby: AIO embedded
  • Distribution: Ubuntu 22.04
  • Module version: v3.2.0

How to reproduce (e.g Puppet code you use)

Do some settings with different targets:

  sysctl{'net.ipv6.conf.all.disable_ipv6': ensure => present, value => 1, target => '/etc/sysctl.d/99-disable-ipv6.conf' }
  sysctl{'net.ipv4.tcp_syncookies':         ensure => present, value => 2, target => '/etc/sysctl.d/99-ddos-abwehr.conf'}

and apply them.
Both files are created and the entries are added.

Then try to remove the second setting:

  sysctl{'net.ipv6.conf.all.disable_ipv6': ensure => present, value => 1, target => '/etc/sysctl.d/99-disable-ipv6.conf' }
  sysctl{'net.ipv4.tcp_syncookies':          ensure => absent, value => 2, target => '/etc/sysctl.d/99-ddos-abwehr.conf'}

and the apply will do nothing

If I remove the first entry (net.ipv6.conf.all.disable_ipv6) from the manifest or move the second entry to the top, it works.

What are you seeing

Puppet does not remove the second setting

What behaviour did you expect instead

Puppet should remove the second setting when ensure=>absent is active.

Output log

Nothing

Any additional information you'd like to impart

The module seems to support only one target file if you want to remove an entry. Changing values or adding entries works, regardless of the number of targets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant