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

Not working in Debian 8 #45

Open
ikkaro opened this issue Jul 25, 2016 · 3 comments
Open

Not working in Debian 8 #45

ikkaro opened this issue Jul 25, 2016 · 3 comments

Comments

@ikkaro
Copy link

ikkaro commented Jul 25, 2016

Hi,

The module is creating the file but not filling it with mi values. In the server I see a symlink like this one 99-sysctl.conf -> ../sysctl.conf, but the configuration parameters doesn't change.

classes:
 - roles
 - sysctl::base::values:
   sysctl::value: 'net.ipv4.ip_forward'
      value: '1'
    ensure: present
@tpdownes
Copy link

tpdownes commented Aug 2, 2016

Well, you're doing at least 1 thing wrong. It should be

classes:
  - roles
  - sysctl::base

sysctl::base:values:
  'net.ipv4.ip_forward':
    value: '1'

But I'm running into a propblem with automatic parameter lookup (defaults to priority in Puppet 4). I think what's happening is that later versions of hiera get confused by the periods or underscores in an automatic lookup (priority) of sysctl::base::values. This can be resolved by switching to an explicit hash lookup.

sysctl::base::hiera_merge_values: true

I'm thinking of adding a Puppet 4 branch to this repo. hiera_merge_values can be set more naturally using the advanced parameter lookups available in v4. Would that be welcome?

@zlanyi
Copy link

zlanyi commented Aug 18, 2016

Hi,
i have a same problem with module.

Puppet v4.5.3
lsb_release -d
Description: Debian GNU/Linux 8.5 (jessie)

hiera/40_modules/sysctl.yaml:

sysctl::base::hiera_merge_values: true
sysctl::base::values:
net.ipv4.icmp_echo_ignore_broadcasts:
value: '1'
net.ipv4.icmp_ignore_bogus_error_responses:
value: '1'
net.ipv4.conf.all.accept_redirects:
value: '0'
net.ipv6.conf.all.accept_redirects:
value: '0'
net.ipv4.conf.all.send_redirects:
value: '0'
net.ipv4.conf.all.log_martians:
value: '1'
net.ipv4.conf.default.log_martians:
value: '1'
net.ipv4.ip_forward:
value: '0'
net.ipv4.tcp_syncookies:
value: '1'
net.ipv4.tcp_max_syn_backlog:
value: '2048'
net.ipv4.tcp_synack_retries:
value: '3'
net.ipv4.conf.all.rp_filter:
value: '1'
net.core.somaxconn:
value: '1024'
net.ipv4.tcp_challenge_ack_limit:
value: '999999999'

class { 'sysctl::base': } in base.pp

The module does'nt generate files in /etc/sysctl.d.
Any idea?:)

regards,
Zoltan

@tpdownes
Copy link

For anything puppet4, you might want to look at my pull request #46 or the fork that it comes from. It isn't backwards-compatible, but it doesn't have the weirdness of sysctl being a defined type without being a class.

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

3 participants