parent
323a3db478
commit
9850f73a17
4 changed files with 51 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
|||
version: "2.3"
|
||||
|
||||
services:
|
||||
web-rng:
|
||||
image: docker.pkg.github.com/realorangeone/web-rng/web-rng:latest
|
||||
container_name: web-rng
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.web-rng.rule=Host(`rng.theorangeone.net`)"
|
||||
- "traefik.http.routers.web-rng.tls.certresolver=le"
|
|
@ -43,5 +43,8 @@
|
|||
- name: Install wallabag
|
||||
include: wallabag.yml
|
||||
|
||||
- name: Install web-rng
|
||||
include: web-rng.yml
|
||||
|
||||
- name: Install whoami
|
||||
include: whoami.yml
|
||||
|
|
29
ansible/roles/intersect-docker/tasks/web-rng.yml
Normal file
29
ansible/roles/intersect-docker/tasks/web-rng.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
- name: Create web-rng directory
|
||||
file:
|
||||
path: /opt/web-rng
|
||||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install web-rng compose file
|
||||
template:
|
||||
src: files/web-rng/docker-compose.yml
|
||||
dest: /opt/web-rng/docker-compose.yml
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
validate: /usr/bin/docker-compose -f %s config
|
||||
register: compose_file
|
||||
become: true
|
||||
|
||||
- name: Cycle web-rng container
|
||||
docker_compose:
|
||||
project_src: /opt/web-rng
|
||||
pull: true
|
||||
remove_orphans: true
|
||||
remove_volumes: true
|
||||
state: "{{ item }}"
|
||||
when: compose_file.changed
|
||||
loop:
|
||||
- absent
|
||||
- present
|
|
@ -148,3 +148,11 @@ resource "cloudflare_record" "theorangeonenet_upload" {
|
|||
type = "A"
|
||||
ttl = 1
|
||||
}
|
||||
|
||||
resource "cloudflare_record" "theorangeonenet_rng" {
|
||||
zone_id = cloudflare_zone.theorangeonenet.id
|
||||
name = "rng"
|
||||
value = vultr_server.casey.main_ip
|
||||
type = "A"
|
||||
ttl = 1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue