feat: add option to add custom unit override options
This commit is contained in:
parent
0f881e669b
commit
7fc0fdce9b
@ -41,7 +41,7 @@ local PipelineLinting = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
local PipelineDeployment(scenario='centos7') = {
|
local PipelineDeployment(scenario='rocky9') = {
|
||||||
kind: 'pipeline',
|
kind: 'pipeline',
|
||||||
name: 'testing-' + scenario,
|
name: 'testing-' + scenario,
|
||||||
platform: {
|
platform: {
|
||||||
@ -115,7 +115,7 @@ local PipelineDocumentation = {
|
|||||||
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
|
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
|
||||||
},
|
},
|
||||||
depends_on: [
|
depends_on: [
|
||||||
'testing-centos7',
|
'testing-rocky9',
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ local PipelineNotification = {
|
|||||||
|
|
||||||
[
|
[
|
||||||
PipelineLinting,
|
PipelineLinting,
|
||||||
PipelineDeployment(scenario='centos7'),
|
PipelineDeployment(scenario='rocky9'),
|
||||||
PipelineDocumentation,
|
PipelineDocumentation,
|
||||||
PipelineNotification,
|
PipelineNotification,
|
||||||
]
|
]
|
||||||
|
@ -36,7 +36,7 @@ trigger:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: testing-centos7
|
name: testing-rocky9
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
@ -53,7 +53,7 @@ steps:
|
|||||||
- name: ansible-molecule
|
- name: ansible-molecule
|
||||||
image: thegeeklab/molecule:4
|
image: thegeeklab/molecule:4
|
||||||
commands:
|
commands:
|
||||||
- molecule test -s centos7
|
- molecule test -s rocky9
|
||||||
environment:
|
environment:
|
||||||
HCLOUD_TOKEN:
|
HCLOUD_TOKEN:
|
||||||
from_secret: hcloud_token
|
from_secret: hcloud_token
|
||||||
@ -107,7 +107,7 @@ trigger:
|
|||||||
- refs/pull/**
|
- refs/pull/**
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- testing-centos7
|
- testing-rocky9
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@ -147,6 +147,6 @@ depends_on:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 07e123ae54fb79836d48b0fee57666759de62d8e85a94d9386179e636b2235e3
|
hmac: 9937973aed8a030a7c7d74909473f0424bea63aad70049727a2925b10d00aac2
|
||||||
|
|
||||||
...
|
...
|
||||||
|
@ -13,11 +13,12 @@ dockerengine_packages:
|
|||||||
dockerengine_packages_extra: []
|
dockerengine_packages_extra: []
|
||||||
|
|
||||||
docker_ansible_deps:
|
docker_ansible_deps:
|
||||||
- cryptography~=2.0
|
- cryptography
|
||||||
- docker-compose~=1.24.0
|
- docker-compose
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
dockerengine_service: docker
|
dockerengine_service: docker
|
||||||
|
dockerengine_service_override_unit: []
|
||||||
|
|
||||||
dockerengine_docker_group_enabled: False
|
dockerengine_docker_group_enabled: False
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
vars:
|
vars:
|
||||||
dockerengine_packages_extra:
|
dockerengine_packages_extra:
|
||||||
- epel-release
|
- epel-release
|
||||||
- python-pip
|
- python3-pip
|
||||||
- python-virtualenv
|
- python3-virtualenv
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: xoxys.docker_engine
|
- role: xoxys.docker_engine
|
@ -20,7 +20,7 @@
|
|||||||
pip:
|
pip:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
virtualenv: /opt/python2/ansible-deps
|
virtualenv: /opt/python2/ansible-deps
|
||||||
loop: "{{ docker_ansible_deps }}"
|
loop: "{{ dockerengine_ansible_deps }}"
|
||||||
|
|
||||||
- name: Add docker-compose wrapper
|
- name: Add docker-compose wrapper
|
||||||
template:
|
template:
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#jinja2: lstrip_blocks: True
|
||||||
{{ ansible_managed | comment }}
|
{{ ansible_managed | comment }}
|
||||||
OPTIONS='{{'--userns-remap=' + dockerengine_nsremap_user + ':' + dockerengine_nsremap_user if dockerengine_usernamespace_enabled | bool else '' }}'
|
OPTIONS='{{'--userns-remap=' + dockerengine_nsremap_user + ':' + dockerengine_nsremap_user if dockerengine_usernamespace_enabled | bool else '' }}'
|
||||||
|
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
#jinja2: lstrip_blocks: True
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
{% if dockerengine_service_override_unit | default([]) | length > 0 %}
|
||||||
|
[Unit]
|
||||||
|
{% for item in dockerengine_service_override_unit %}
|
||||||
|
{{ item }}
|
||||||
|
{% endfor %}
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/sysconfig/docker
|
EnvironmentFile=-/etc/sysconfig/docker
|
||||||
ExecStart=
|
ExecStart=
|
||||||
|
Loading…
Reference in New Issue
Block a user