No description
Find a file
Ashley Penney 46a17f97c5 Refactor to use puppetlabs-apt.
This is just the first step of fixing up the repo stuff and allowing
the module to take in a package_name, but this helps replace the
execs{} with puppetlabs-apt.

Tested on:  Debian 7, Ubuntu 12.04.
2013-09-04 17:57:41 -04:00
manifests Refactor to use puppetlabs-apt. 2013-09-04 17:57:41 -04:00
spec Merge pull request #131 from apenney/allow-deny 2013-09-04 13:05:58 -07:00
templates This commit addresses issue #49, the lack of ways to set allow and 2013-09-04 13:04:28 -04:00
tests linting 2013-05-08 14:15:42 +02:00
.fixtures.yml Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
.gitignore Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
.nodeset.yml Add basic rspec-system tests. 2013-09-04 15:11:36 -04:00
ChangeLog Rebase bashtoni's pull request from a year ago: 2012-12-05 23:11:29 -08:00
composer.json added original license to composer.json 2013-05-18 15:37:27 +02:00
Gemfile Add basic rspec-system tests. 2013-09-04 15:11:36 -04:00
Gemfile.lock Refactor to use puppetlabs-apt. 2013-09-04 17:57:41 -04:00
LICENSE 20110524 Work Snapshot 2011-05-24 21:20:48 -05:00
Modulefile Refactor to use puppetlabs-apt. 2013-09-04 17:57:41 -04:00
Puppetfile Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
Puppetfile.lock Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
Rakefile Add basic rspec-system tests. 2013-09-04 15:11:36 -04:00
README.markdown Update README to use syntax highlighting 2013-08-25 22:21:53 -07:00

NGINX Module

James Fryman james@frymanet.com

This module manages NGINX configuration.

Quick Start

Install and bootstrap an NGINX instance

class { 'nginx': }

Setup a new virtual host

nginx::resource::vhost { 'www.puppetlabs.com':
  ensure   => present,
  www_root => '/var/www/www.puppetlabs.com',
}

Add a Proxy Server

nginx::resource::upstream { 'puppet_rack_app':
 ensure  => present,
 members => [
   'localhost:3000',
   'localhost:3001',
   'localhost:3002',
 ],
}

nginx::resource::vhost { 'rack.puppetlabs.com':
  ensure => present,
  proxy  => 'http://puppet_rack_app',
}

Add a smtp proxy


class { 'nginx':
 mail => true,
}

nginx::resource::mailhost { 'domain1.example':
 ensure      => present,
 auth_http   => 'server2.example/cgi-bin/auth',
 protocol    => 'smtp',
 listen_port => 587,
 ssl_port    => 465,
 starttls    => 'only',
 xclient     => 'off',
 ssl         => 'true',
 ssl_cert    => '/tmp/server.crt',
 ssl_key     => '/tmp/server.pem',
}

Hiera Support

Defining nginx resources in Hiera.

nginx::nginx_upstreams:
  'puppet_rack_app':
    ensure: present
    members:
      - localhost:3000
      - localhost:3001
      - localhost:3002
nginx::nginx_vhosts:
  'www.puppetlabs.com':
    www_root: '/var/www/www.puppetlabs.com'
  'rack.puppetlabs.com':
    ensure: present
    proxy: 'http://puppet_rack_app'
nginx::nginx_locations:
  'static':
    location: '~ "^/static/[0-9a-fA-F]{8}\/(.*)$"'
    vhost: www.puppetlabs.com
  'userContent':
    location: /userContent
    vhost: www.puppetlabs.com
    www_root: /var/www/html