diff --git a/README.md b/README.md index 4d9c7b72..bd533901 100644 --- a/README.md +++ b/README.md @@ -1019,6 +1019,7 @@ This module supports: * Ubuntu 18.04 * Ubuntu 20.04 * Ubuntu 22.04 +* Archlinux * Windows Server 2016 (Docker Enterprise Edition only) * Windows Server 2019 (Docker Enterprise Edition only) * Windows Server 2022 (Docker Enterprise Edition only) diff --git a/manifests/init.pp b/manifests/init.pp index 29984e62..982bf391 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -475,8 +475,8 @@ Boolean $have_systemd_v230 = $docker::params::have_systemd_v230, ) inherits docker::params { if $facts['os']['family'] and ! $acknowledge_unsupported_os { - assert_type(Pattern[/^(Debian|RedHat|windows)$/], $facts['os']['family']) |$a, $b| { - fail('This module only works on Debian, Red Hat or Windows based systems.') + assert_type(Pattern[/^(Debian|RedHat|Archlinux|windows)$/], $facts['os']['family']) |$a, $b| { + fail('This module only works on Debian, Red Hat, Archlinux or Windows based systems.') } if ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '7') < 0) { fail('This module only works on Red Hat based systems version 7 and higher.') diff --git a/manifests/install.pp b/manifests/install.pp index 36c535af..568e8e45 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -27,10 +27,9 @@ Array $dependent_packages = $docker::dependent_packages, ) { $docker_start_command = $docker::docker_start_command - if $facts['os']['family'] and ! $docker::acknowledge_unsupported_os { - assert_type(Pattern[/^(Debian|RedHat|windows)$/], $facts['os']['family']) |$a, $b| { - fail('This module only works on Debian, RedHat or Windows.') + assert_type(Pattern[/^(Debian|RedHat|Archlinux|windows)$/], $facts['os']['family']) |$a, $b| { + fail('This module only works on Debian, RedHat, Archlinux or Windows.') } } if $docker::version and $docker::ensure != 'absent' { diff --git a/manifests/params.pp b/manifests/params.pp index 540abee9..04a5341c 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -4,7 +4,6 @@ $version = undef $ensure = present $docker_ce_start_command = 'dockerd' - $docker_ce_package_name = 'docker-ce' $docker_ce_cli_package_name = 'docker-ce-cli' $docker_engine_start_command = 'docker daemon' $docker_engine_package_name = 'docker-engine' @@ -166,6 +165,7 @@ $storage_setup_file = undef $use_upstream_package_source = true + $docker_ce_package_name = 'docker-ce' $package_ce_source_location = "https://download.docker.com/linux/${os_lc}" $package_ce_key_source = "https://download.docker.com/linux/${os_lc}/gpg" $package_ce_key_id = '9DC858229FC7DD38854AE2D88D81803C0EBFCD88' @@ -211,6 +211,7 @@ $apt_source_pin_level = undef $detach_service_in_init = false + $docker_ce_package_name = 'docker-ce' $package_ce_key_id = undef $package_ce_key_source = 'https://download.docker.com/linux/centos/gpg' $package_ce_release = undef @@ -306,6 +307,7 @@ $service_hasstatus = undef $service_hasrestart = undef $service_provider = 'systemd' + $docker_ce_package_name = 'docker-ce' $package_name = $docker_ce_package_name $service_name = $service_name_default $detach_service_in_init = true @@ -318,6 +320,48 @@ $pin_upstream_package_source = undef $apt_source_pin_level = undef } + 'Archlinux' : { + $docker_group = $docker_group_default + $socket_group = $socket_group_default + $package_key_source = undef + $package_key_check_source = undef + $package_source_location = undef + $package_key_id = undef + $package_repos = undef + $package_release = undef + $package_ce_key_source = undef + $package_ce_source_location = undef + $package_ce_key_id = undef + $package_ce_repos = undef + $package_ce_release = undef + $package_ee_source_location = undef + $package_ee_key_source = undef + $package_ee_key_id = undef + $package_ee_release = undef + $package_ee_repos = undef + $package_ee_package_name = undef + $use_upstream_package_source = false + $service_overrides_template = undef + $socket_overrides_template = undef + $socket_override = false + $service_after_override = 'docker/etc/systemd/system/docker.service.d/service-overrides-debian.conf.erb' + $service_hasstatus = true + $service_hasrestart = true + $service_provider = 'systemd' + $docker_ce_package_name = 'docker' + $package_name = $docker_ce_package_name + $service_name = $service_name_default + $detach_service_in_init = true + $repo_opt = undef + $nowarn_kernel = false + $service_config = undef + $storage_config = undef + $storage_setup_file = undef + $service_config_template = 'docker/etc/sysconfig/docker.systemd.erb' + $pin_upstream_package_source = undef + $apt_source_pin_level = undef + include docker::systemd_reload + } default: { $docker_group = $docker_group_default $socket_group = $socket_group_default @@ -338,7 +382,7 @@ $package_ee_release = undef $package_ee_repos = undef $package_ee_package_name = undef - $use_upstream_package_source = true + $use_upstream_package_source = false $service_overrides_template = undef $socket_overrides_template = undef $socket_override = false diff --git a/manifests/service.pp b/manifests/service.pp index 80c429b7..ad647340 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -261,8 +261,8 @@ Optional[Variant[String,Array]] $registry_mirror = $docker::registry_mirror, String $root_dir_flag = $docker::root_dir_flag, ) { - unless $facts['os']['family'] =~ /(Debian|RedHat|windows)/ or $docker::acknowledge_unsupported_os { - fail('The docker::service class needs a Debian, Redhat or Windows based system.') + unless $facts['os']['family'] =~ /(Debian|RedHat|Archlinux|windows)/ or $::docker::acknowledge_unsupported_os { + fail('The docker::service class needs a Debian, Redhat, Archlinux or Windows based system.') } $dns_array = any2array($dns) diff --git a/metadata.json b/metadata.json index 2eb75cb7..d244db2d 100644 --- a/metadata.json +++ b/metadata.json @@ -55,6 +55,9 @@ "2019", "2022" ] + }, + { + "operatingsystem": "Archlinux" } ], "requirements": [