Giter Club home page Giter Club logo

Comments (6)

skoef avatar skoef commented on June 19, 2024

What is the result in your jail config when setting path to '/jails/$name' then?

from puppet-jails.

skoef avatar skoef commented on June 19, 2024

When I define the following:

jails::defaults:
  path:              '/jails/$name'
jails::jails:
  test:
    host_hostname: 'foo.bar.org'

I end up with a /etc/jail.d/test.conf looking like this:

# File managed by Puppet
# Do not edit manualy as your changes will be overwritten
# and might cause this jail to restart!

# jail definition for test
test {
    path = "/jails/$name";
    host.hostname = "foo.bar.org";
    exec.start = "/bin/sh /etc/rc";
    exec.stop = "/bin/sh /etc/rc.shutdown";
}

I think I don't understand the actual issue right here :)

from puppet-jails.

zachfi avatar zachfi commented on June 19, 2024

Well you are getting something different than I am getting, and while I am not using hiera, I conceptually have a similar thing that you do. I will take a harder look at the code. I'm in the middle of converting all my jails to this module. I don't see other defaults at all that I am expecting either. For example, the default interface. I have

    class { 'jails':
      defaults => {
        'interface'   => $default_interface,
        'allow_mount' => true,
        'exec_start'  => '/bin/sh /etc/rc',
        'exec_stop'   => '/bin/sh /etc/rc.shutdown',
        'exec_clean'  => true,
        'mount_devfs' => true,
      }
    }

But in my jails I am missing the mount_devfs, exec_clean, and interface configs. Still digging, but thats what I'm seeing.

from puppet-jails.

zachfi avatar zachfi commented on June 19, 2024
    class { 'jails':
      defaults             => {
        'interface'        => $default_interface,
        'allow_mount'      => true,
        'exec_start'       => '/bin/sh /etc/rc',
        'exec_stop'        => '/bin/sh /etc/rc.shutdown',
        'exec_clean'       => true,
        'mount_devfs'      => true,
        'mount.zfs'        => true,
        'enforce_statfs'   => 1,
        'path'             => '/jails/$name',
        #'allow.socket_af' => true,
      }
    }
  jails::jail { 'graphite1':
    host_hostname => 'graphite1.example',
    ip6_addr      => 'fc00::123',
    ip4_addr      => '192.168.1.10'
  }

Yields the following in /etc/jail.d/graphite1.conf:

graphite1 {
    path = "/jails/$name";
    ip4.addr = "192.168.1.10";
    ip6.addr = "fc00::123";
    host.hostname = "graphite1.example";
    exec.start = "/bin/sh /etc/rc";
    exec.stop = "/bin/sh /etc/rc.shutdown";
}

In this example $path is recognized but not the rest of the options in default. Perhaps there is some parse thing going on here. This is odd.

from puppet-jails.

zachfi avatar zachfi commented on June 19, 2024

I think I've just learned that defaults are not actually default for anything other than the hiera jails.

from puppet-jails.

zachfi avatar zachfi commented on June 19, 2024

See #4

from puppet-jails.

Related Issues (5)

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.