Giter VIP home page Giter VIP logo

Comments (6)

westbywest avatar westbywest commented on September 26, 2024

I think the correct hiera entry would be:

selinux::selinux_booleans:
  httpd_can_network_relay:
    ensure: on

from puppet-selinux.

ryayon avatar ryayon commented on September 26, 2024

Seems weird as the code in the boolean.pp is:

#  selinux::boolean{ 'named_write_master_zones':
#     ensure     => "on",
#     persistent => true,
#  }
#

define selinux::boolean (
  $ensure     = 'on',
  $persistent = true,
) {
......
}

from puppet-selinux.

westbywest avatar westbywest commented on September 26, 2024

Aha, I had misread your original comment, or more specifically the code starting at line 33 of the selinux init class. I believe the problem is that specifying in code empty hashes as default values for parameters prevents puppet from doing automatic hiera lookup, as that lookup only does native merging and not deep merging.

Try changing lines 33 to 36 in init.pp as such:

  $selinux_booleans,
  $selinux_modules,
  $selinux_fcontexts,
  $selinux_ports

Then change lines 63 to 66 to be this:

  if $selinux_booleans {
    create_resources('selinux::boolean', $selinux_booleans)
  }
  if $selinux_modules {
    create_resources('selinux::module', $selinux_modules)
  }
  if $selinux_fcontexts {
    create_resources('selinux::fcontext', $selinux_fcontexts)
  }
  if $selinux_ports {
    create_resources('selinux::port', $selinux_ports)
  }

At that point, the following hiera should work as expected:

selinux::selinux_booleans:
  httpd_can_network_relay:
    ensure: on

Note that I'm not a maintainer of this module. You'd want to submit a PR with these changes to get their attention.

from puppet-selinux.

ryayon avatar ryayon commented on September 26, 2024

Thanks.
I will prepare a PR.

from puppet-selinux.

ryayon avatar ryayon commented on September 26, 2024

I just created the PR #128

from puppet-selinux.

ryayon avatar ryayon commented on September 26, 2024

Issue fixed

from puppet-selinux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.