class pantin::sudo(
	Array[String] $admins = [],
	Array[String] $admins_ro = [],
) {
	package { 'sudo':
		ensure => present,
	} ->
	group { 'sudoro':
		system => true,
	} ->
	file { '/etc/sudoers':
		mode => '0440',
		content => file('pantin/etc/sudoers'),
	} ->
	file { '/etc/sudoers.d/sudoro':
		mode => '0440',
		content => file('pantin/etc/sudoers.d/sudoro'),
	}

	$admins.each |String $admin| {
		augeas { "sudo-membership-${admin}":
			context => "/files/etc/group/sudo",
			changes => [
				# Set the value to $member at index where $member
				# is (therefore not adding dupes)
				"set user[.='$admin'] $admin",
			],
			require => Package['sudo'],
		}
	} 

	$admins_ro.each |String $admin| {
		augeas { "adminro-membership-${admin}":
			context => "/files/etc/group/sudoro",
			changes => [
				# Set the value to $member at index where $member
				# is (therefore not adding dupes)
				"set user[.='$admin'] $admin",
			],
			require => Group['sudoro'],
		}
	}
}
