diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-12 02:26:25 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-12 02:26:25 +0100 |
commit | dd28dcf3d620a4ac7d0a1532b812213cf094cd3c (patch) | |
tree | a3fa8c8ef446de2bcc2f317bceb4bca868f7e0f0 /modules/pacman | |
parent | Move webdav into profiles. (diff) | |
download | webdav_server-dd28dcf3d620a4ac7d0a1532b812213cf094cd3c.tar.gz webdav_server-dd28dcf3d620a4ac7d0a1532b812213cf094cd3c.tar.xz |
Revert "Move webdav into profiles."
It actually reverts the non-need for the nginx module webdav_ext. Since
Omnifocus requires PROPFIND.
This reverts commit edf6ffe8b399679ba28cc5e558a6838919dd1ee8.
Diffstat (limited to '')
-rw-r--r-- | modules/pacman/files/mirrorlist | 6 | ||||
-rw-r--r-- | modules/pacman/manifests/hook.pp | 80 | ||||
-rw-r--r-- | modules/pacman/manifests/init.pp | 44 | ||||
-rw-r--r-- | modules/pacman/manifests/repo.pp | 24 | ||||
-rw-r--r-- | modules/pacman/templates/hook.epp | 31 |
5 files changed, 0 insertions, 185 deletions
diff --git a/modules/pacman/files/mirrorlist b/modules/pacman/files/mirrorlist deleted file mode 100644 index 4ea5d0e..0000000 --- a/modules/pacman/files/mirrorlist +++ /dev/null @@ -1,6 +0,0 @@ -# File managed by puppet, local changes WILL be overwritten - -Server = https://ftp.lysator.liu.se/pub/archlinux/$repo/os/$arch -Server = http://ftp.lysator.liu.se/pub/archlinux/$repo/os/$arch -Server = https://ftp.acc.umu.se/mirror/archlinux/$repo/os/$arch -Server = http://ftp.acc.umu.se/mirror/archlinux/$repo/os/$arch diff --git a/modules/pacman/manifests/hook.pp b/modules/pacman/manifests/hook.pp deleted file mode 100644 index f8478e6..0000000 --- a/modules/pacman/manifests/hook.pp +++ /dev/null @@ -1,80 +0,0 @@ - -type Pacman::Operation = Enum['Install', 'Upgrade', 'Remove'] -# type Variant[Type, Array[Type, 1]] = Variant[Type, Array[Type, 1]] - -type Pacman::Trigger = Struct[{ - type => Enum['Path', 'Package'], - operation => Variant[Pacman::Operation, Array[Pacman::Operation, 1]], - target => Variant[String, Array[String, 1]], -}] - -define pacman::hook ( - Integer $priority = 50, - Optional[String] $description = undef, - Enum['PreTransation', 'PostTransaction'] $when, - String $exec, - Optional[Variant[String, Array[String, 1]]] $depends = undef, - Boolean $abortOnFail = false, # only for PreTransation - Boolean $needsTargets = false, - Variant[Pacman::Trigger, Array[Pacman::Trigger, 1]] $trigger, -) { - - require ::pacman - - if ($abortOnFail and $when != 'PreTransation') { - fail('abortOnFail only valid when "when" => "PreTransation"') - } - - # Normalize triggers to list - $triggers = ($trigger ? { - Array => $trigger, - default => [$trigger], - }).map |$trigger| { - # Normalize contents of each trigger, making - { - type => $trigger['type'], - operation => $trigger['operation'] ? { - Array => $trigger['operation'], - default => [$trigger['operation']], - }, - target => $trigger['target'] ? { - Array => $trigger['target'], - default => [$trigger['target']], - } - } - } - - $triggers.each |$trigger| { - if $trigger['type'] == 'Path' { - $trigger['target'].each |$target| { - if $target[0] == '/' { - fail("Target paths shouldn't start with '/' ${target} in trigger ${name}") - } - } - } - } - - $str = epp('pacman/hook.epp', { - description => $description, - depends => $depends ? { - Optional => [], - Array => $depends, - default => [$depends], - }, - triggers => $triggers, - exec => $exec, - when => $when, - abortOnFail => $abortOnFail, - needsTargets => $needsTargets, - }) - - $chksum = $str.md5() - - file { $chksum: - ensure => 'present', - content => $str, - path => "${pacman::hooks_path}/${priority}-${name}.hook", - checksum => 'md5', - checksum_value => $chksum, - } -} diff --git a/modules/pacman/manifests/init.pp b/modules/pacman/manifests/init.pp deleted file mode 100644 index fb23328..0000000 --- a/modules/pacman/manifests/init.pp +++ /dev/null @@ -1,44 +0,0 @@ -class pacman ( - String $hooks_path = '/etc/pacman.d/hooks-puppet', - String $conf_path = '/etc/pacman.conf', - Boolean $ilovecandy = false, -) { - - ini_setting { 'Pacman HookDir': - path => $conf_path, - section => 'options', - setting => 'HookDir', - value => $hooks_path, - - } - - ini_setting { 'Pacman ILoveCandy': - ensure => if ($ilovecandy) { present } else { absent }, - path => '/etc/pacman.conf', - section => 'options', - setting => 'ILoveCandy', - key_val_separator => '', - value => '', - } - - if versioncmp($facts['pacman-version'], '6.0.0') >= 0 { - ini_setting { 'Pacman parallel downloads': - path => '/etc/pacman.conf', - section => 'options', - setting => 'ParallelDownloads', - value => 8, - } - } - - file { $hooks_path: - ensure => directory, - recurse => true, - purge => true, - } - - file { '/etc/pacman.d/mirrorlist': - ensure => present, - backup => true, - source => 'puppet:///modules/pacman/mirrorlist', - } -} diff --git a/modules/pacman/manifests/repo.pp b/modules/pacman/manifests/repo.pp deleted file mode 100644 index 28f92b0..0000000 --- a/modules/pacman/manifests/repo.pp +++ /dev/null @@ -1,24 +0,0 @@ -define pacman::repo ( - Enum['present', 'absent'] $ensure = 'present', - String $repo_name = $name, - # String $include, - String $server, - String $sig_level, -) { - - ini_setting { - default: - ensure => $ensure, - path => $::pacman::conf_path, - section => $repo_name , - ; - "Pacman repo [${repo_name}] server": - setting => 'Server', - value => $server , - ; - "Pacman repo [${repo_name}] SigLevel": - setting => 'SigLevel', - value => $sig_level , - ; - } -} diff --git a/modules/pacman/templates/hook.epp b/modules/pacman/templates/hook.epp deleted file mode 100644 index 08377d9..0000000 --- a/modules/pacman/templates/hook.epp +++ /dev/null @@ -1,31 +0,0 @@ -<%- | Array[Pacman::Trigger] $triggers, - Optional[String] $description, - String $exec, - Enum['PreTransation', 'PostTransaction'] $when, - Array[String] $depends, - Boolean $abortOnFail, - Boolean $needsTargets, - -| -%> -# Managed by Puppet - -[Trigger] -<%- $triggers.each |$trigger| { -%> -Type = <%= $trigger['type'] %> -<%- $trigger['operation'].each |$op| { -%> -Operation = <%= $op %> -<%- } -%> -<% $trigger['target'].each |$target| { -%> -Target = <%= $target %> -<%- } -%> -<%- } %> - -[Action] -<%- if ($description) { -%>Description = <%= $description %><% } %> -Exec = <%= $exec %> -When = <%= $when %> -<%- $depends.each |$depend| { -%> -Depends = <%= $depend %> -<%- } -%> -<%- if ($abortOnFail) { -%>AbortOnFail<% } %> -<%- if ($needsTargets) { -%>NeedsTargets<% } %> |