Compare commits
No commits in common. "d68d96015e33c78267960fbf64e5aefb7ee3754b" and "6c4ccbaab1138a5aa0881c047e0e91ab57256e3d" have entirely different histories.
d68d96015e
...
6c4ccbaab1
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
exclude_paths:
|
|
||||||
- .github/
|
|
||||||
- molecule/
|
|
||||||
|
|
||||||
warn_list:
|
|
||||||
- internal-error
|
|
||||||
|
|
||||||
# vi: ft=yaml
|
|
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@ -1,4 +1,3 @@
|
|||||||
---
|
|
||||||
name: Release
|
name: Release
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@ -10,6 +9,7 @@ env:
|
|||||||
GALAXY_USERNAME: IronicBadger
|
GALAXY_USERNAME: IronicBadger
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -29,5 +29,4 @@ jobs:
|
|||||||
- name: Trigger a new import on Galaxy.
|
- name: Trigger a new import on Galaxy.
|
||||||
run: >-
|
run: >-
|
||||||
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
|
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
|
||||||
$(echo ${{ env.GALAXY_USERNAME }})
|
$(echo ${{ env.GALAXY_USERNAME }}) $(echo ${{ github.repository }} | cut -d/ -f2)
|
||||||
$(echo ${{ github.repository }} | cut -d/ -f2)
|
|
||||||
|
17
README.md
17
README.md
@ -79,21 +79,4 @@ containers:
|
|||||||
mem_limit: 128m
|
mem_limit: 128m
|
||||||
ports:
|
ports:
|
||||||
- "4242:4242"
|
- "4242:4242"
|
||||||
- service_name: netbox
|
|
||||||
active: true
|
|
||||||
image: docker.io/netboxcommunity/netbox:v3.6-2.7.0
|
|
||||||
anchor: netbox
|
|
||||||
user: "unit:root"
|
|
||||||
- service_name: netbox-worker
|
|
||||||
active: true
|
|
||||||
fragment: netbox
|
|
||||||
command:
|
|
||||||
- /opt/netbox/venv/bin/python
|
|
||||||
- /opt/netbox/netbox/manage.py
|
|
||||||
- rqworker
|
|
||||||
- service_name: netbox-housekeeping
|
|
||||||
active: true
|
|
||||||
fragment: netbox
|
|
||||||
command:
|
|
||||||
- /opt/netbox/housekeeping.sh
|
|
||||||
```
|
```
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
docker_compose_generator_output_path: "~"
|
docker_compose_generator_output_path: "~"
|
||||||
docker_compose_generator_uid: "1000"
|
docker_compose_generator_uid: "1000"
|
||||||
docker_compose_generator_gid: "1000"
|
docker_compose_generator_gid: "1000"
|
@ -1,11 +1,9 @@
|
|||||||
---
|
---
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
role_name: docker_compose_generator
|
role_name: docker_compose_generator
|
||||||
namespace: ironicbadger
|
|
||||||
author: Alex Kretzschmar
|
author: Alex Kretzschmar
|
||||||
description: Create a docker-compose.yml file
|
description: Create a docker-compose.yml file
|
||||||
issue_tracker_url: "https://github.com/ironicbadger/\
|
issue_tracker_url: https://github.com/ironicbadger/ansible-role-create-users/issues
|
||||||
ansible-role-create-users/issues"
|
|
||||||
license: GPLv2
|
license: GPLv2
|
||||||
min_ansible_version: 2.4
|
min_ansible_version: 2.4
|
||||||
platforms:
|
platforms:
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure destination for compose file exists
|
- name: ensure destination for compose file exists
|
||||||
ansible.builtin.file:
|
file:
|
||||||
path: "{{ docker_compose_generator_output_path }}"
|
path: "{{ docker_compose_generator_output_path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
|
||||||
|
|
||||||
- name: Write docker-compose file
|
- name: write docker-compose file
|
||||||
ansible.builtin.template:
|
template:
|
||||||
src: docker-compose.yml.j2
|
src: ../templates/docker-compose.yml.j2
|
||||||
dest: "{{ docker_compose_generator_output_path }}/docker-compose.yml"
|
dest: "{{ docker_compose_generator_output_path }}/docker-compose.yml"
|
||||||
owner: "{{ docker_compose_generator_uid }}"
|
owner: "{{ docker_compose_generator_uid }}"
|
||||||
group: "{{ docker_compose_generator_gid }}"
|
group: "{{ docker_compose_generator_gid }}"
|
||||||
mode: 0644
|
|
@ -3,13 +3,8 @@
|
|||||||
services:
|
services:
|
||||||
{% for container in containers %}
|
{% for container in containers %}
|
||||||
{% if container.active %}
|
{% if container.active %}
|
||||||
{{ container.service_name }}:{% if container.anchor is defined %} &{{ container.anchor }}{% endif %}
|
{{ container.service_name }}:
|
||||||
|
|
||||||
{% if container.fragment is defined %}
|
|
||||||
<<: *{{ container.fragment }}
|
|
||||||
{% else %}
|
|
||||||
image: {{ container.image }}
|
image: {{ container.image }}
|
||||||
{% endif %}
|
|
||||||
container_name: {{ container.container_name | default(container.service_name) }}
|
container_name: {{ container.container_name | default(container.service_name) }}
|
||||||
{% if container.extra_hosts is defined %}
|
{% if container.extra_hosts is defined %}
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
@ -20,24 +15,6 @@ services:
|
|||||||
{% if container.network_mode is defined %}
|
{% if container.network_mode is defined %}
|
||||||
network_mode: {{ container.network_mode }}
|
network_mode: {{ container.network_mode }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if container.networks is defined %}
|
|
||||||
networks:
|
|
||||||
{% if container.networks is iterable and (container.networks is not string and container.networks is not mapping) %}
|
|
||||||
{% for network in container.networks %}
|
|
||||||
- {{ network }}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
{% for network, params in container.networks.items() %}
|
|
||||||
{{ network }}:
|
|
||||||
{% if params.aliases is defined %}
|
|
||||||
aliases:
|
|
||||||
{% for alias in params.aliases %}
|
|
||||||
- {{ alias }}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% if container.build is defined %}
|
{% if container.build is defined %}
|
||||||
build: {{ container.build }}
|
build: {{ container.build }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -72,19 +49,12 @@ services:
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if container.labels is defined %}
|
{% if container.labels is defined %}
|
||||||
{% if container.labels is none %}
|
|
||||||
labels: []
|
|
||||||
{% else %}
|
|
||||||
labels:
|
labels:
|
||||||
{% for label in container.labels %}
|
{% for label in container.labels %}
|
||||||
- {{ label }}
|
- {{ label }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
{% if container.ports is defined %}
|
{% if container.ports is defined %}
|
||||||
{% if container.ports is none %}
|
|
||||||
ports: []
|
|
||||||
{% else %}
|
|
||||||
ports:
|
ports:
|
||||||
{% for port in container.ports %}
|
{% for port in container.ports %}
|
||||||
- {{ port }}
|
- {{ port }}
|
||||||
@ -230,17 +200,3 @@ services:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if docker_networks is defined %}
|
|
||||||
networks:
|
|
||||||
{% for network in docker_networks %}
|
|
||||||
{% if network.active %}
|
|
||||||
{{ network.network_name }}:
|
|
||||||
{% if network.external is defined %}
|
|
||||||
external: {{ network.external }}
|
|
||||||
{% endif %}
|
|
||||||
{% if network.driver is defined %}
|
|
||||||
driver: {{ network.driver }}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user