Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • unicaen_authentification
  • release_3.1.0
  • 3.x
  • 2.x
  • 4.0.0
  • 3.1.0
  • 2.0.1
  • 3.0.0
  • 2.0.0
  • 1.0.0
11 results

AnonymServiceFactory.php

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    home_server.pp 807 B
    # Configure a home_server for proxy config
    define freeradius::home_server (
      $secret,
      $type = 'auth',
      $ipaddr = '',
      $ipv6addr = '',
      $virtual_server = '',
      $port = 1812,
      $proto = 'udp',
    ) {
      $fr_basepath = $::freeradius::params::fr_basepath
    
      # Validate multiple choice options
      unless $type in ['auth', 'acct', 'auth+acct', 'coa'] {
        fail('$type must be one of auth, acct, auth+acct, coa')
      }
      unless $proto in ['udp', 'tcp'] {
        fail('$type must be one of udp, tcp')
      }
    
      # Validate integers
      unless is_integer($port) {
        fail('$port must be an integer')
      }
    
      # Configure config fragment for this home server
      concat::fragment { "homeserver-${name}":
        target  => "${fr_basepath}/proxy.conf",
        content => template('freeradius/home_server.erb'),
        order   => 10,
      }
    }