Compare commits
No commits in common. "dev" and "master" have entirely different histories.
@ -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
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@ -10,6 +9,7 @@ env:
|
||||
GALAXY_USERNAME: IronicBadger
|
||||
|
||||
jobs:
|
||||
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
@ -29,5 +29,4 @@ jobs:
|
||||
- name: Trigger a new import on Galaxy.
|
||||
run: >-
|
||||
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
|
||||
$(echo ${{ env.GALAXY_USERNAME }})
|
||||
$(echo ${{ github.repository }} | cut -d/ -f2)
|
||||
$(echo ${{ env.GALAXY_USERNAME }}) $(echo ${{ github.repository }} | cut -d/ -f2)
|
||||
|
18
README.md
18
README.md
@ -45,7 +45,6 @@ containers:
|
||||
active: true
|
||||
image: nextcloud
|
||||
container_name: nextcloud
|
||||
user: www-data
|
||||
include_global_env_vars: false
|
||||
volumes:
|
||||
- "{{ appdata_path }}/nextcloud/html:/var/www/html"
|
||||
@ -79,21 +78,4 @@ containers:
|
||||
mem_limit: 128m
|
||||
ports:
|
||||
- "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_uid: "1000"
|
||||
docker_compose_generator_gid: "1000"
|
||||
docker_compose_generator_gid: "1000"
|
@ -1,11 +1,9 @@
|
||||
---
|
||||
galaxy_info:
|
||||
role_name: docker_compose_generator
|
||||
namespace: ironicbadger
|
||||
author: Alex Kretzschmar
|
||||
description: Create a docker-compose.yml file
|
||||
issue_tracker_url: "https://github.com/ironicbadger/\
|
||||
ansible-role-create-users/issues"
|
||||
issue_tracker_url: https://github.com/ironicbadger/ansible-role-create-users/issues
|
||||
license: GPLv2
|
||||
min_ansible_version: 2.4
|
||||
platforms:
|
||||
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
vars_files:
|
||||
- vars.yml
|
||||
|
||||
tasks:
|
||||
- ansible.builtin.import_tasks: ../../tasks/main.yaml
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
ansible-lint
|
||||
platforms:
|
||||
- name: instance
|
||||
image: geerlingguy/docker-debian11-ansible:latest
|
||||
command: ""
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
priveleged: true
|
||||
pre_build_image: true
|
||||
provisioner:
|
||||
name: ansible
|
||||
verifier:
|
||||
name: ansible
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
collections:
|
||||
- community.docker
|
@ -1,9 +0,0 @@
|
||||
---
|
||||
containers:
|
||||
- name: apache2
|
||||
active: true
|
||||
image: ubuntu/apache2:2.4-22.04_beta
|
||||
ports:
|
||||
- 80:80
|
||||
environment:
|
||||
- TZ=UTC
|
@ -1,9 +0,0 @@
|
||||
---
|
||||
- name: Verify
|
||||
hosts: all
|
||||
|
||||
tasks:
|
||||
- name: Verify Apache is serving web requests.
|
||||
ansible.builtin.uri:
|
||||
url: http://localhost/
|
||||
status_code: 200
|
@ -1,14 +1,12 @@
|
||||
---
|
||||
- name: Ensure destination for compose file exists
|
||||
ansible.builtin.file:
|
||||
- name: ensure destination for compose file exists
|
||||
file:
|
||||
path: "{{ docker_compose_generator_output_path }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: Write docker-compose file
|
||||
ansible.builtin.template:
|
||||
src: docker-compose.yml.j2
|
||||
- name: write docker-compose file
|
||||
template:
|
||||
src: ../templates/docker-compose.yml.j2
|
||||
dest: "{{ docker_compose_generator_output_path }}/docker-compose.yml"
|
||||
owner: "{{ docker_compose_generator_uid }}"
|
||||
group: "{{ docker_compose_generator_gid }}"
|
||||
mode: 0644
|
||||
group: "{{ docker_compose_generator_gid }}"
|
@ -3,13 +3,8 @@
|
||||
services:
|
||||
{% for container in containers %}
|
||||
{% if container.active %}
|
||||
{{ container.service_name }}:{% if container.anchor is defined %} &{{ container.anchor }}{% endif %}
|
||||
|
||||
{% if container.fragment is defined %}
|
||||
<<: *{{ container.fragment }}
|
||||
{% else %}
|
||||
{{ container.service_name }}:
|
||||
image: {{ container.image }}
|
||||
{% endif %}
|
||||
container_name: {{ container.container_name | default(container.service_name) }}
|
||||
{% if container.extra_hosts is defined %}
|
||||
extra_hosts:
|
||||
@ -20,30 +15,9 @@ services:
|
||||
{% if container.network_mode is defined %}
|
||||
network_mode: {{ container.network_mode }}
|
||||
{% 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 %}
|
||||
build: {{ container.build }}
|
||||
{% endif %}
|
||||
{% if container.user is defined %}
|
||||
user: {{ container.user }}
|
||||
{% endif %}
|
||||
{% if container.privileged is defined %}
|
||||
privileged: {{ container.privileged }}
|
||||
{% endif %}
|
||||
@ -59,9 +33,6 @@ services:
|
||||
- {{ group }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if container.runtime is defined %}
|
||||
runtime: {{ container.runtime }}
|
||||
{% endif %}
|
||||
{% if container.devices is defined %}
|
||||
devices:
|
||||
{% for device in container.devices %}
|
||||
@ -75,25 +46,17 @@ services:
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if container.labels is defined %}
|
||||
{% if container.labels is none %}
|
||||
labels: []
|
||||
{% else %}
|
||||
labels:
|
||||
{% for label in container.labels %}
|
||||
- {{ label }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if container.ports is defined %}
|
||||
{% if container.ports is none %}
|
||||
ports: []
|
||||
{% else %}
|
||||
ports:
|
||||
{% for port in container.ports %}
|
||||
- {{ port }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if container.expose is defined %}
|
||||
expose:
|
||||
{% for expose_port in container.expose %}
|
||||
@ -234,17 +197,3 @@ services:
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% 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