Skip to content
Snippets Groups Projects
nginx.pp 772 B
Newer Older
  • Learn to ignore specific revisions
  • Nils Olof Paulsson's avatar
    Nils Olof Paulsson committed
    # intelligent comment here
    class egg::nginx () {
      $hostname = fact( 'networking.fqdn' )
      $hostalias = []
      package { 'nginx':
        ensure => 'installed',
      }
      # inserf conf. files here
      # file { '/etc/nginx/nginx.conf':
      #   ensure => 'file',
      #   source => "puppet:///modules/${module_name}/nginx.conf",
      #   notify => Service['nginx'],
      # }
      file { '/etc/nginx/conf.d/eggsample.conf':
    
    Nils Olof Paulsson's avatar
    Nils Olof Paulsson committed
        ensure  => 'present',
        source  => "puppet:///modules/${module_name}/eggsample.conf",
        notify  => Service['nginx'],
        require => Package['nginx'],
    
    Nils Olof Paulsson's avatar
    Nils Olof Paulsson committed
      }
    
      # Housekeeping
      service { 'nginx':
        ensure => 'running',
        enable => true,
      }
      firewalld_service { 'Allow http in the liu Zone':
        ensure  => present,
        zone    => 'liu',
        service => 'http',
      }
    
    Nils Olof Paulsson's avatar
    Nils Olof Paulsson committed
    }