Many updates over time
This commit is contained in:
20
virt/arcane/files/compose.yml
Normal file
20
virt/arcane/files/compose.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
services:
|
||||
arcane:
|
||||
image: ghcr.io/getarcaneapp/arcane:latest
|
||||
container_name: arcane
|
||||
ports:
|
||||
- '3552:3552'
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- arcane-data:/app/data
|
||||
- /opt/projects:/app/data/projects
|
||||
environment:
|
||||
- APP_URL=http://arcane1.mreschke.net:3552
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- ENCRYPTION_KEY=FbAK6DaqI1EEA5bEWPyBLetsuY748DbqWzw4a3/q3G0=
|
||||
- JWT_SECRET=flLR6aTtJSQ+PgxlHW5pUrE6LlBwXxbnvwy5g4dFUS0=
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
arcane-data:
|
||||
32
virt/arcane/tasks/main.yml
Normal file
32
virt/arcane/tasks/main.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
|
||||
# Create /opt/arcane
|
||||
- name: Creating /opt/arcane
|
||||
file:
|
||||
path: /opt/arcane
|
||||
owner: "{{ superuser }}"
|
||||
group: "{{ supergroup }}"
|
||||
state: directory
|
||||
|
||||
# Create /opt/projects
|
||||
- name: Creating /opt/projects
|
||||
file:
|
||||
path: /opt/projects
|
||||
owner: "{{ superuser }}"
|
||||
group: "{{ supergroup }}"
|
||||
state: directory
|
||||
|
||||
# Copy Arcane docker compose file
|
||||
- name: Copying Arcane compose.yml
|
||||
copy:
|
||||
src: compose.yml
|
||||
dest: /opt/arcane/compose.yml
|
||||
owner: "{{ superuser }}"
|
||||
group: "{{ supergroup }}"
|
||||
mode: '0644'
|
||||
|
||||
# Docker compose up
|
||||
- name: Starting Arcane if not already running
|
||||
shell: "docker compose up -d"
|
||||
args:
|
||||
chdir: /opt/arcane
|
||||
39
virt/docker-OLD/tasks/main.yml
Normal file
39
virt/docker-OLD/tasks/main.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
- name: Installing Docker apt repository prerequisites
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- gnupg2
|
||||
- software-properties-common
|
||||
|
||||
- name: Addding Debian Docker apt repository key
|
||||
apt_key: url='https://download.docker.com/linux/debian/gpg' state=present
|
||||
|
||||
- name: Adding Debian 9 Docker apt repository sources
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian stretch stable' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "9"
|
||||
|
||||
- name: Adding Debian 10 Docker apt repository sources
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian buster stable' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "10"
|
||||
|
||||
- name: Adding Debian 11 Docker apt repository sources
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "11"
|
||||
|
||||
- name: Adding Debian 12 Docker apt repository sources
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian bookworm stable' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "12"
|
||||
|
||||
- name: Installing Docker
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name:
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- containerd.io
|
||||
- docker-compose
|
||||
14
virt/docker/defaults/main.yml
Normal file
14
virt/docker/defaults/main.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
docker_data_root: "/var/lib/docker"
|
||||
|
||||
# A 172.16.0.0/16 gives max of 172.16.255.254
|
||||
# And a /25 pool size means 126 IPs in each docker network
|
||||
docker_default_address_pool_base: "172.16.0.0/16"
|
||||
docker_default_address_pool_size: "25"
|
||||
|
||||
# Log Opts Defaults https://docs.docker.com/config/containers/logging/json-file/
|
||||
# NOTE: integers must be quoted as strings or you get this error "cannot unmarshal number into Go struct field Config.log-opts of type string"
|
||||
docker_log_driver: "json-file"
|
||||
docker_log_opts_max_size: "100m"
|
||||
docker_log_opts_max_file: "3"
|
||||
docker_version: 28.4.0
|
||||
|
||||
5
virt/docker/handlers/main.yml
Normal file
5
virt/docker/handlers/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: restart docker
|
||||
service:
|
||||
name: docker
|
||||
state: restarted
|
||||
81
virt/docker/tasks/Debian/Debian_11.yml
Normal file
81
virt/docker/tasks/Debian/Debian_11.yml
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
|
||||
# Add some prerequisites
|
||||
- name: Installing Docker Prerequisites on {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- gnupg2
|
||||
- software-properties-common
|
||||
|
||||
# Add APT GPG key
|
||||
- name: Adding Docker APT repository key for {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
apt_key: url='https://download.docker.com/linux/debian/gpg' state=present
|
||||
|
||||
# Add apt repository
|
||||
- name: Adding Docker APT repository for {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable' state=present
|
||||
|
||||
# Apt update
|
||||
- name: Updating apt cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
||||
# Get exact apt package docker version based on var docker_version
|
||||
- name: Finding APT Docker Version String for {{ docker_version }}
|
||||
shell: "apt-cache madison docker-ce | awk '{ print $3 }' | grep '{{ docker_version }}' | sort | tail -n1"
|
||||
register: docker_version_output
|
||||
|
||||
# Setting docker version string
|
||||
- name: Set docker_version_string variable to {{ docker_version_output.stdout }}
|
||||
set_fact:
|
||||
docker_version_string: "{{ docker_version_output.stdout }}"
|
||||
|
||||
# Install docker and docker-compose-plugin
|
||||
# note that with the version in here it will upgrade docker to this version, it may fail if a newer version is installed
|
||||
- name: Installing Docker
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
# Tell apt to NOT start docker after install
|
||||
policy_rc_d: 101
|
||||
name:
|
||||
- docker-ce={{ docker_version_string }}
|
||||
- docker-ce-cli={{ docker_version_string }}
|
||||
- containerd.io
|
||||
- docker-buildx-plugin
|
||||
- docker-compose-plugin
|
||||
|
||||
# Configure docker /etc/docker/daemon.js (notice docker has NOT started yet because of policy_rc_d)
|
||||
- name: Creating /etc/docker
|
||||
file:
|
||||
path: /etc/docker
|
||||
owner: root
|
||||
group: root
|
||||
state: directory
|
||||
- name: Templating /etc/daemon.json
|
||||
template:
|
||||
src: daemon.json.j2
|
||||
dest: /etc/docker/daemon.json
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
backup: yes
|
||||
notify: restart docker
|
||||
|
||||
# Start docker now that we have copied our custom /etc/docker/daemon.json
|
||||
- name: Starting docker daemon
|
||||
service:
|
||||
name: docker
|
||||
enabled: yes
|
||||
state: started
|
||||
|
||||
# Install python-docker (required for ansible docker modules)
|
||||
- name: Installing python3-docker for {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name: python3-docker
|
||||
81
virt/docker/tasks/Debian/Debian_12.yml
Normal file
81
virt/docker/tasks/Debian/Debian_12.yml
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
|
||||
# Add some prerequisites
|
||||
- name: Installing Docker Prerequisites on {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- gnupg2
|
||||
- software-properties-common
|
||||
|
||||
# Add APT GPG key
|
||||
- name: Adding Docker APT repository key for {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
apt_key: url='https://download.docker.com/linux/debian/gpg' state=present
|
||||
|
||||
# Add apt repository
|
||||
- name: Adding Docker APT repository for {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian bookworm stable' state=present
|
||||
|
||||
# Apt update
|
||||
- name: Updating apt cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
||||
# Get exact apt package docker version based on var docker_version
|
||||
- name: Finding APT Docker Version String for {{ docker_version }}
|
||||
shell: "apt-cache madison docker-ce | awk '{ print $3 }' | grep '{{ docker_version }}' | sort | tail -n1"
|
||||
register: docker_version_output
|
||||
|
||||
# Setting docker version string
|
||||
- name: Set docker_version_string variable to {{ docker_version_output.stdout }}
|
||||
set_fact:
|
||||
docker_version_string: "{{ docker_version_output.stdout }}"
|
||||
|
||||
# Install docker and docker-compose-plugin
|
||||
# note that with the version in here it will upgrade docker to this version, it may fail if a newer version is installed
|
||||
- name: Installing Docker
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
# Tell apt to NOT start docker after install
|
||||
policy_rc_d: 101
|
||||
name:
|
||||
- docker-ce={{ docker_version_string }}
|
||||
- docker-ce-cli={{ docker_version_string }}
|
||||
- containerd.io
|
||||
- docker-buildx-plugin
|
||||
- docker-compose-plugin
|
||||
|
||||
# Configure docker /etc/docker/daemon.js (notice docker has NOT started yet because of policy_rc_d)
|
||||
- name: Creating /etc/docker
|
||||
file:
|
||||
path: /etc/docker
|
||||
owner: root
|
||||
group: root
|
||||
state: directory
|
||||
- name: Templating /etc/daemon.json
|
||||
template:
|
||||
src: daemon.json.j2
|
||||
dest: /etc/docker/daemon.json
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
backup: yes
|
||||
notify: restart docker
|
||||
|
||||
# Start docker now that we have copied our custom /etc/docker/daemon.json
|
||||
- name: Starting docker daemon
|
||||
service:
|
||||
name: docker
|
||||
enabled: yes
|
||||
state: started
|
||||
|
||||
# Install python-docker (required for ansible docker modules)
|
||||
- name: Installing python3-docker for {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name: python3-docker
|
||||
204
virt/docker/tasks/Debian/Debian_13.yml
Normal file
204
virt/docker/tasks/Debian/Debian_13.yml
Normal file
@@ -0,0 +1,204 @@
|
||||
---
|
||||
|
||||
# Add some prerequisites
|
||||
- name: Installing Docker Prerequisites on {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- gnupg2
|
||||
#- software-properties-common # not on debian 13
|
||||
|
||||
# Add APT GPG key
|
||||
# NOTE apt_key is deprecated in Debian 13, use get_url and store the key in /etc/apt/trusted.gpg.d/*
|
||||
- name: Adding Docker APT repository key for {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
ansible.builtin.get_url:
|
||||
url: "https://download.docker.com/linux/debian/gpg"
|
||||
dest: /etc/apt/trusted.gpg.d/docker.asc
|
||||
mode: '0644'
|
||||
force: true
|
||||
|
||||
# Add apt repository
|
||||
- name: Adding Docker APT repository for {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
apt_repository:
|
||||
filename: docker
|
||||
state: present
|
||||
repo: 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/docker.asc] https://download.docker.com/linux/debian trixie stable'
|
||||
|
||||
# Apt update
|
||||
- name: Updating apt cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
||||
# Get exact apt package docker version based on var docker_version
|
||||
- name: Finding APT Docker Version String for {{ docker_version }}
|
||||
shell: "apt-cache madison docker-ce | awk '{ print $3 }' | grep '{{ docker_version }}' | sort | tail -n1"
|
||||
register: docker_version_output
|
||||
|
||||
# Setting docker version string
|
||||
- name: Set docker_version_string variable to {{ docker_version_output.stdout }}
|
||||
set_fact:
|
||||
docker_version_string: "{{ docker_version_output.stdout }}"
|
||||
|
||||
# Install docker and docker-compose-plugin
|
||||
# note that with the version in here it will upgrade docker to this version, it may fail if a newer version is installed
|
||||
- name: Installing Docker
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
# Tell apt to NOT start docker after install
|
||||
policy_rc_d: 101
|
||||
name:
|
||||
- docker-ce={{ docker_version_string }}
|
||||
- docker-ce-cli={{ docker_version_string }}
|
||||
- containerd.io
|
||||
- docker-buildx-plugin
|
||||
- docker-compose-plugin
|
||||
|
||||
# Configure docker /etc/docker/daemon.js (notice docker has NOT started yet because of policy_rc_d)
|
||||
- name: Creating /etc/docker
|
||||
file:
|
||||
path: /etc/docker
|
||||
owner: root
|
||||
group: root
|
||||
state: directory
|
||||
- name: Templating /etc/daemon.json
|
||||
template:
|
||||
src: daemon.json.j2
|
||||
dest: /etc/docker/daemon.json
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
backup: yes
|
||||
notify: restart docker
|
||||
|
||||
# Start docker now that we have copied our custom /etc/docker/daemon.json
|
||||
- name: Starting docker daemon
|
||||
service:
|
||||
name: docker
|
||||
enabled: yes
|
||||
state: started
|
||||
|
||||
# Install python-docker (required for ansible docker modules)
|
||||
- name: Installing python3-docker for {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name: python3-docker
|
||||
|
||||
|
||||
|
||||
|
||||
# # Add docker apt GPG key and repo (creates to /etc/apt/sources.list.d/download_docker_com_linux_debian.list )
|
||||
# - name: Adding Docker apt repository key
|
||||
# apt_key: url='https://download.docker.com/linux/debian/gpg' state=present
|
||||
# when: ansible_distribution == 'Debian'
|
||||
|
||||
# - name: Adding Docker apt repository key
|
||||
# apt_key: url='https://download.docker.com/linux/ubuntu/gpg' state=present
|
||||
# when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
# - name: Adding Debian 9 Docker apt repository sources
|
||||
# apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian stretch stable' state=present
|
||||
# when: ansible_os_family == "Debian" and ansible_distribution_major_version == "9"
|
||||
|
||||
# - name: Adding Debian 10 Docker apt repository sources
|
||||
# apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian buster stable' state=present
|
||||
# when: ansible_os_family == "Debian" and ansible_distribution_major_version == "10"
|
||||
|
||||
# - name: Adding Debian 11 Docker apt repository sources
|
||||
# apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable' state=present
|
||||
# when: ansible_os_family == "Debian" and ansible_distribution_major_version == "11"
|
||||
|
||||
# - name: Adding Debian 12 Docker apt repository sources
|
||||
# apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian bookworm stable' state=present
|
||||
# when: ansible_os_family == "Debian" and ansible_distribution_major_version == "12"
|
||||
|
||||
# - name: Adding Docker apt repository sources for Ubuntu 18
|
||||
# apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable' state=present
|
||||
# when: ansible_os_family == "Debian" and ansible_distribution_major_version == "18"
|
||||
|
||||
# - name: Adding Docker apt repository sources for Ubuntu 20
|
||||
# apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable' state=present
|
||||
# when: ansible_os_family == "Debian" and ansible_distribution_major_version == "20"
|
||||
|
||||
# - name: Adding Docker apt repository sources for Ubuntu 22
|
||||
# apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/ubuntu jammy stable' state=present
|
||||
# when: ansible_os_family == "Debian" and ansible_distribution_major_version == "22"
|
||||
|
||||
# - name: Adding Docker apt repository sources for Ubuntu 24
|
||||
# apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/ubuntu noble stable' state=present
|
||||
# when: ansible_os_family == "Debian" and ansible_distribution_major_version == "24"
|
||||
|
||||
|
||||
|
||||
# - name: Update apt cache
|
||||
# apt:
|
||||
# update_cache: yes
|
||||
|
||||
# - name: find docker version string
|
||||
# shell: "apt-cache madison docker-ce | awk '{ print $3 }' | grep '{{ docker_version }}' | sort | tail -n1"
|
||||
# register: docker_version_output
|
||||
|
||||
# - name: set docker_version_string variable
|
||||
# set_fact:
|
||||
# docker_version_string: "{{ docker_version_output.stdout }}"
|
||||
|
||||
# # Install docker and docker-compose-plugin
|
||||
# # note that with the version in here it will upgrade docker to this version, it may fail if a newer version is installed
|
||||
# - name: Installing Docker
|
||||
# apt:
|
||||
# update_cache: yes
|
||||
# state: present
|
||||
# # Tell apt to NOT start docker after install
|
||||
# policy_rc_d: 101
|
||||
# name:
|
||||
# - docker-ce={{ docker_version_string }}
|
||||
# - docker-ce-cli={{ docker_version_string }}
|
||||
# - containerd.io
|
||||
# - docker-buildx-plugin
|
||||
# - docker-compose-plugin
|
||||
|
||||
# # Configure docker /etc/docker/daemon.js (notice docker has NOT started yet because of policy_rc_d)
|
||||
# # - name: Create /etc/docker
|
||||
# # file:
|
||||
# # path: /etc/docker
|
||||
# # owner: root
|
||||
# # group: root
|
||||
# # state: directory
|
||||
|
||||
# # - name: Copying daemon.json
|
||||
# # template:
|
||||
# # src: daemon.json.j2
|
||||
# # dest: /etc/docker/daemon.json
|
||||
# # owner: root
|
||||
# # group: root
|
||||
# # mode: 0644
|
||||
# # backup: yes
|
||||
# # notify: restart docker
|
||||
|
||||
|
||||
# # Start docker now that we have copied our custom /etc/docker/daemon.json
|
||||
# - name: Starting docker daemon
|
||||
# service:
|
||||
# name: docker
|
||||
# enabled: yes
|
||||
# state: started
|
||||
|
||||
|
||||
# # # Install python-docker (required for ansible docker modules)
|
||||
# # - name: Installing python-docker for Ubuntu 18
|
||||
# # apt:
|
||||
# # update_cache: yes
|
||||
# # state: present
|
||||
# # name: python-docker
|
||||
# # when: ansible_os_family == "Debian" and ansible_distribution_major_version == "18"
|
||||
|
||||
# # - name: Installing python3-docker for Ubuntu 20+
|
||||
# # apt:
|
||||
# # update_cache: yes
|
||||
# # state: present
|
||||
# # name: python3-docker
|
||||
# # when: ansible_os_family == "Debian" and ansible_distribution_major_version >= "20"
|
||||
5
virt/docker/tasks/Debian/main.yml
Normal file
5
virt/docker/tasks/Debian/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
# Dynamically include proper file based on OS and Version
|
||||
- name: Configuring Docker on {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
include_tasks: "{{ ansible_distribution }}_{{ ansible_distribution_major_version }}.yml"
|
||||
5
virt/docker/tasks/Ubuntu/main.yml
Normal file
5
virt/docker/tasks/Ubuntu/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
# Dynamically include proper file based on OS and Version
|
||||
- name: Configuring Docker on {{ ansible_distribution }} {{ ansible_distribution_major_version }}
|
||||
include_tasks: "{{ ansible_distribution }}_{{ ansible_distribution_major_version }}.yml"
|
||||
@@ -1,35 +1,5 @@
|
||||
---
|
||||
- name: Installing Docker apt repository prerequisites
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- gnupg2
|
||||
- software-properties-common
|
||||
|
||||
- name: Addding Debian Docker apt repository key
|
||||
apt_key: url='https://download.docker.com/linux/debian/gpg' state=present
|
||||
|
||||
- name: Adding Debian 9 Docker apt repository sources
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian stretch stable' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "9"
|
||||
|
||||
- name: Adding Debian 10 Docker apt repository sources
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian buster stable' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "10"
|
||||
|
||||
- name: Adding Debian 11 Docker apt repository sources
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "11"
|
||||
|
||||
- name: Installing Docker
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name:
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- containerd.io
|
||||
- docker-compose
|
||||
# OS Specific main.yml
|
||||
- name: "Configure Docker on {{ ansible_distribution }}"
|
||||
include_tasks: "{{ ansible_distribution }}/main.yml"
|
||||
|
||||
17
virt/docker/templates/daemon.json.j2
Normal file
17
virt/docker/templates/daemon.json.j2
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"cgroup-parent": "system.slice",
|
||||
"containerd-namespace": "docker",
|
||||
"default-address-pools": [
|
||||
{
|
||||
"base": "{{ docker_default_address_pool_base }}",
|
||||
"size": {{ docker_default_address_pool_size }}
|
||||
}
|
||||
],
|
||||
"storage-driver": "overlay2",
|
||||
"data-root": "{{ docker_data_root }}",
|
||||
"log-driver": "{{ docker_log_driver }}",
|
||||
"log-opts": {
|
||||
"max-size": "{{ docker_log_opts_max_size }}",
|
||||
"max-file": "{{ docker_log_opts_max_file }}"
|
||||
}
|
||||
}
|
||||
13
virt/dockge/files/compose.yml
Normal file
13
virt/dockge/files/compose.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
services:
|
||||
dockge:
|
||||
image: louislam/dockge:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 5001:5001
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /opt/dockge/data:/app/data
|
||||
- /opt/stacks:/opt/stacks
|
||||
environment:
|
||||
# Tell Dockge where to find the stacks
|
||||
- DOCKGE_STACKS_DIR=/opt/stacks
|
||||
49
virt/dockge/tasks/main.yml
Normal file
49
virt/dockge/tasks/main.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
|
||||
# Create /opt/dockge
|
||||
- name: Creating /opt/dockge
|
||||
file:
|
||||
path: /opt/dockge
|
||||
owner: "{{ superuser }}"
|
||||
group: "{{ supergroup }}"
|
||||
state: directory
|
||||
|
||||
# Create /opt/stacks
|
||||
- name: Creating /opt/stacks
|
||||
file:
|
||||
path: /opt/stacks
|
||||
owner: "{{ superuser }}"
|
||||
group: "{{ supergroup }}"
|
||||
state: directory
|
||||
|
||||
|
||||
# Create /opt/dockge
|
||||
- name: Creating /opt/dockge
|
||||
file:
|
||||
path: /opt/dockge
|
||||
owner: "{{ superuser }}"
|
||||
group: "{{ supergroup }}"
|
||||
state: directory
|
||||
|
||||
# Create /opt/dockge/data
|
||||
- name: Creating /opt/dockge/data
|
||||
file:
|
||||
path: /opt/dockge/data
|
||||
owner: "{{ superuser }}"
|
||||
group: "{{ supergroup }}"
|
||||
state: directory
|
||||
|
||||
# Copy Dockge docker compose file
|
||||
- name: Copying Dockge compose.yml
|
||||
copy:
|
||||
src: compose.yml
|
||||
dest: /opt/dockge/compose.yml
|
||||
owner: "{{ superuser }}"
|
||||
group: "{{ supergroup }}"
|
||||
mode: '0644'
|
||||
|
||||
# Docker compose up
|
||||
- name: Starting Dockge if not already running
|
||||
shell: "docker compose up -d"
|
||||
args:
|
||||
chdir: /opt/dockge
|
||||
@@ -77,7 +77,7 @@
|
||||
notify: restart libvirtd # Only runs if file changed!
|
||||
|
||||
# Copy scripts to /usr/local/bin
|
||||
- include_tasks: ../../../functions/copy_usr-local-bin.yml
|
||||
- include_tasks: ../../shared/functions/copy_usr-local-bin.yml
|
||||
|
||||
# Schedule cron
|
||||
- name: Scheduling cron cron-root-daily-12am
|
||||
|
||||
Reference in New Issue
Block a user