Skip to content

Commit

Permalink
Move RHEL specifics into RHEL case
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianSipos authored Apr 3, 2024
1 parent cc45ffb commit 1ec9257
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions puppet/modules/anms/manifests/docker.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@
ensure => 'absent',
before => Package['docker-ce'],
}
package { 'yum-utils':
ensure => 'installed',
}
file { '/etc/yum.repos.d/docker.repo':
ensure => 'absent',
}
exec { 'yum-repo-docker-ce':
path => $facts['path'],
command => 'yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo',
creates => '/etc/yum.repos.d/docker-ce.repo',
require => Package['yum-utils'],
before => [Package['docker-ce'], Package['docker-buildx-plugin'], Package['docker-compose-plugin']],
}
}
default: {}
}

package { 'yum-utils':
ensure => 'installed',
}
file { '/etc/yum.repos.d/docker.repo':
ensure => 'absent',
}
exec { 'yum-repo-docker-ce':
path => $facts['path'],
command => 'yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo',
creates => '/etc/yum.repos.d/docker-ce.repo',
}
package { ['docker-ce', 'docker-ce-cli', 'containerd.io', 'docker-buildx-plugin', 'docker-compose-plugin']:
require => Exec['yum-repo-docker-ce'],
ensure => 'installed',
}
service { 'docker':
require => Package['docker-ce'],
Expand All @@ -41,4 +43,4 @@
mode => '0644',
notify => Service['docker'],
}
}
}

0 comments on commit 1ec9257

Please sign in to comment.