45 lines
1.1 KiB
Puppet
45 lines
1.1 KiB
Puppet
# Class for forgeo action runner.
|
|
class podmanrunner::runner (
|
|
Integer $replicas = 2,
|
|
)
|
|
{
|
|
user { 'podmanuser':
|
|
ensure => present,
|
|
home => '/opt/podmanuser',
|
|
shell => '/usr/sbin/nologin',
|
|
uid => '1001',
|
|
managehome => true,
|
|
}
|
|
package { 'podman':
|
|
ensure => installed,
|
|
provider => apt,
|
|
}
|
|
file { '/opt/podmanuser/docker-compose.yaml':
|
|
ensure => file,
|
|
content => template('podmanrunner/docker-compose.yaml.erb'),
|
|
owner => 'podmanuser',
|
|
group => 'podmanuser',
|
|
mode => '0600',
|
|
}
|
|
file { '/opt/podmanuser/bin':
|
|
ensure => directory,
|
|
mode => '0700',
|
|
owner => 'podmanuser',
|
|
group => 'podmanuser',
|
|
}
|
|
file { '/opt/podmanuser/bin/podman-compose':
|
|
ensure => file,
|
|
mode => '500',
|
|
source => 'https://raw.githubusercontent.com/containers/podman-compose/v1.0.6/podman_compose.py',
|
|
owner => 'podmanuser',
|
|
group => 'podmanuser',
|
|
}
|
|
file { '/tmp/test.txt':
|
|
ensure => file,
|
|
mode => '444',
|
|
source => 'puppet:///podmanrunner/testfile.txt',
|
|
owner => 'podmanuser',
|
|
group => 'podmanuser',
|
|
}
|
|
}
|