Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
init.pp 1.97 KiB
# @summary A short summary of the purpose of this class
#
# A description of what this class does
# init vlc-server
#
# @example
#   none
class vlc {
  firewalld_service {'Allow http in the liu Zone':
    ensure  => present,
    zone    => 'liu',
    service => 'http',
  }
  firewalld_service {'Allow https in the liu Zone':
    ensure  => present,
    zone    => 'liu',
    service => 'https',
  }
  firewalld_service {'Allow http in the public Zone':
    ensure  => present,
    zone    => 'public',
    service => 'http',
  }
  firewalld_service {'Allow https in the public Zone':
    ensure  => present,
    zone    => 'public',
    service => 'https',
  }

  # Känner firewall till servicen syncthing ??
  firewalld_service {'Allow http in the public Zone':
    ensure  => present,
    zone    => 'public',
    service => 'syncthing',
  }
  firewalld_service {'Allow https in the public Zone':
    ensure  => present,
    zone    => 'liu',
    service => 'syncthing',
  }
  firewalld_service {'Allow https in the public Zone':
    ensure  => present,
    zone    => 'liu',
    service => 'syncthing-gui',
  }

  # Detta funkar för vpn på andra burkar
  server_firewall::address_set { 'liu_vpn':
    addresses => [
      '10.243.0.0/16',
    ],
  }

  firewalld_rich_rule { 'allow ssh via vpn':
    action  => 'accept',
    service => 'ssh',
    source  => { 'ipset' => 'liu_vpn_v4', },
    family  => 'ipv4',
    zone    => 'liu',
  }

  # Detta installerar syncthing om det behövs
  package { 'syncthing':
    ensure => 'installed',
  }

  # Installera config.xml
  # file { '/home/henfr13/.config':
  #   ensure => 'directory',
  # }
  # file { '/home/henfr13/.config/syncthing':
  #   ensure  => 'directory',
  #   require => File['/home/henfr13/.config'],
  # }
  # file { '/home/henfr13/.config/syncthing/config.xml':
  #   ensure => 'file',
  #   owner  => 'henfr13',
  #   source => "puppet:///modules/${module_name}/config.xml",
  #   require => File['/home/henfr13/.config/syncthing'],
  # }
}