feat: add option to add custom unit override options (#5)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #5
This commit is contained in:
parent
0f881e669b
commit
e9e83d2f8d
@ -41,7 +41,7 @@ local PipelineLinting = {
|
||||
},
|
||||
};
|
||||
|
||||
local PipelineDeployment(scenario='centos7') = {
|
||||
local PipelineDeployment(scenario='rocky9') = {
|
||||
kind: 'pipeline',
|
||||
name: 'testing-' + scenario,
|
||||
platform: {
|
||||
@ -71,7 +71,7 @@ local PipelineDeployment(scenario='centos7') = {
|
||||
'linting',
|
||||
],
|
||||
trigger: {
|
||||
ref: ['refs/heads/main', 'refs/tags/**'],
|
||||
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
|
||||
},
|
||||
};
|
||||
|
||||
@ -115,7 +115,7 @@ local PipelineDocumentation = {
|
||||
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
|
||||
},
|
||||
depends_on: [
|
||||
'testing-centos7',
|
||||
'testing-rocky9',
|
||||
],
|
||||
};
|
||||
|
||||
@ -153,7 +153,7 @@ local PipelineNotification = {
|
||||
|
||||
[
|
||||
PipelineLinting,
|
||||
PipelineDeployment(scenario='centos7'),
|
||||
PipelineDeployment(scenario='rocky9'),
|
||||
PipelineDocumentation,
|
||||
PipelineNotification,
|
||||
]
|
||||
|
@ -36,7 +36,7 @@ trigger:
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: testing-centos7
|
||||
name: testing-rocky9
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
@ -53,7 +53,7 @@ steps:
|
||||
- name: ansible-molecule
|
||||
image: thegeeklab/molecule:4
|
||||
commands:
|
||||
- molecule test -s centos7
|
||||
- molecule test -s rocky9
|
||||
environment:
|
||||
HCLOUD_TOKEN:
|
||||
from_secret: hcloud_token
|
||||
@ -62,6 +62,7 @@ trigger:
|
||||
ref:
|
||||
- refs/heads/main
|
||||
- refs/tags/**
|
||||
- refs/pull/**
|
||||
|
||||
depends_on:
|
||||
- linting
|
||||
@ -107,7 +108,7 @@ trigger:
|
||||
- refs/pull/**
|
||||
|
||||
depends_on:
|
||||
- testing-centos7
|
||||
- testing-rocky9
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@ -147,6 +148,6 @@ depends_on:
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 07e123ae54fb79836d48b0fee57666759de62d8e85a94d9386179e636b2235e3
|
||||
hmac: 5ecb808a24d61708adad225a6fd1ffde1b8de1a477f513e21c5e2b14c3790e0d
|
||||
|
||||
...
|
||||
|
@ -12,13 +12,23 @@ dockerengine_packages:
|
||||
# @end
|
||||
dockerengine_packages_extra: []
|
||||
|
||||
docker_ansible_deps:
|
||||
- cryptography~=2.0
|
||||
- docker-compose~=1.24.0
|
||||
dockerengine_ansible_deps:
|
||||
- cryptography
|
||||
- docker-compose
|
||||
- docker
|
||||
|
||||
dockerengine_service: docker
|
||||
|
||||
# @var dockerengine_service_override_unit:description: >
|
||||
# Multiline string of options to add to the `systemd` service override unit section.
|
||||
# @end
|
||||
# @var dockerengine_service_override_unit: $ "_unset_"
|
||||
# @var dockerengine_service_override_unit:example: >
|
||||
# dockerengine_service_override_unit: |
|
||||
# After=time-sync.target
|
||||
# Requires=time-sync.target
|
||||
# @end
|
||||
|
||||
dockerengine_docker_group_enabled: False
|
||||
|
||||
# @var dockerengine_registries:description: List of docker registries to auto login
|
||||
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
vars:
|
||||
dockerengine_packages_extra:
|
||||
- epel-release
|
||||
- python-pip
|
||||
- python-virtualenv
|
||||
|
||||
roles:
|
||||
- role: xoxys.docker_engine
|
14
molecule/rocky9/converge.yml
Normal file
14
molecule/rocky9/converge.yml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
vars:
|
||||
dockerengine_packages_extra:
|
||||
- epel-release
|
||||
- python3-pip
|
||||
- python3-virtualenv
|
||||
pre_tasks:
|
||||
- name: Enable CodeReadyBuilder repository
|
||||
command: dnf config-manager --set-enabled "crb"
|
||||
changed_when: False
|
||||
roles:
|
||||
- role: xoxys.docker_engine
|
@ -9,8 +9,8 @@ dependency:
|
||||
driver:
|
||||
name: delegated
|
||||
platforms:
|
||||
- name: centos7-docker-engine
|
||||
image: centos-7
|
||||
- name: rocky9-docker-engine
|
||||
image: rocky-9
|
||||
server_type: cx11
|
||||
lint: |
|
||||
/usr/local/bin/flake8
|
@ -20,7 +20,7 @@
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
virtualenv: /opt/python2/ansible-deps
|
||||
loop: "{{ docker_ansible_deps }}"
|
||||
loop: "{{ dockerengine_ansible_deps }}"
|
||||
|
||||
- name: Add docker-compose wrapper
|
||||
template:
|
||||
|
@ -1,3 +1,4 @@
|
||||
#jinja2: lstrip_blocks: True
|
||||
{{ ansible_managed | comment }}
|
||||
OPTIONS='{{'--userns-remap=' + dockerengine_nsremap_user + ':' + dockerengine_nsremap_user if dockerengine_usernamespace_enabled | bool else '' }}'
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
#jinja2: lstrip_blocks: True
|
||||
{{ ansible_managed | comment }}
|
||||
{% if dockerengine_service_override_unit is defined %}
|
||||
[Unit]
|
||||
{{ dockerengine_service_override_unit }}
|
||||
{% endif %}
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/sysconfig/docker
|
||||
ExecStart=
|
||||
|
Loading…
Reference in New Issue
Block a user