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

Support SmartOS #131

Closed
wants to merge 1 commit into from
Closed

Support SmartOS #131

wants to merge 1 commit into from

Conversation

joelgarboden
Copy link

Add support for Joyent SmartOS

Functional on SmartOS base-64 15.4.1-lts

@joelgarboden
Copy link
Author

Using this manifest, with JSON Hiera

class dhcp_server (
    $interfaces = [ 'net0' ],
    $nameservers = [ '10.70.7.2', '10.70.7.3' ],
    $ntpservers = ['us.pool.ntp.org'],
    $dnssearchdomains = [ $::domain ],
    $dnsdomain = [ $::domain ],
    $pools = [],
    $hosts = []
  ) {

  class { 'dhcp':
    service_ensure => running,
    dnsdomain => $dnsdomain,
    nameservers => $nameservers,
    ntpservers => $ntpservers,
    interfaces => $interfaces,
    dnssearchdomains => $dnssearchdomains,
  }

  define dhcp_server::dhcp_pool($pool_data = $title) {
    dhcp::pool{ $pool_data['description']:
      network => $pool_data['network'],
      mask    => $pool_data['mask'],
      range   => $pool_data['range'],
      gateway => $pool_data['gateway'],
    }
  }

  define dhcp_server::host_reservation($host_data = $title) {
    dhcp::host{ $host_data['description']:
      mac => $host_data['mac'],
      ip => $host_data['ip'],
    }
  }

  dhcp_server::dhcp_pool { $pools: }

  dhcp_server::host_reservation { $hosts: }

}

@juniorsysadmin
Copy link
Member

@joelgarboden If you could add some corresponding tests in spec/ that would be super

@bastelfreak
Copy link
Member

push

@joelgarboden can you please add spec tests?

@joelgarboden
Copy link
Author

Adding spec tests is a bit unclear to me, I don't see any obvious templates or documentation in modulesync repos. It looks like Vagrant has some SmartOS support, but not sure how to get that into something your modulesync repo wants.

@ekohl
Copy link
Member

ekohl commented Mar 8, 2017

I can't speak for @bastelfreak but I'm assuming he meant to add a case to spec/classes/dhcp_spec.rb similar to the 'on a Darwin OS' test. Provide the correct facts and verify it contains the correct files.

@bastelfreak
Copy link
Member

yep, sorry for being so unspecific. Thanks for the clarification @ekohl.

@petems
Copy link
Member

petems commented Sep 14, 2017

Tests added in rebase: #155, closing in favour of 👍

@petems petems closed this Sep 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants