neuro_ansible/install_scripts/install_code.yaml

83 lines
1.9 KiB
YAML
Raw Normal View History

2024-04-17 00:50:20 +02:00
---
2024-04-25 16:48:40 +02:00
- name: install code server
2024-04-17 00:50:20 +02:00
hosts: all
become: true
tasks:
- name: remove other files
include_tasks: yaml_sub/myrepo_clean.yaml
- name: update file myrepo.repo
import_tasks: yaml_sub/myrepo_data.yaml
- name: install client
ansible.builtin.dnf:
name: "http://10.10.0.3/cmk/check_mk/agents/check-mk-agent-2.2.0p24-1.noarch.rpm"
state: present
update_cache: true
skip_broken: true
nobest: false
allowerasing: true
disable_gpg_check: true
- name: remove other files
include_tasks: yaml_sub/install_docker.yaml
2024-04-25 16:48:40 +02:00
- name: Create network codeNet
community.docker.docker_network:
name: codeNet
2024-04-17 00:50:20 +02:00
- name: Create volume code data
community.docker.docker_volume:
name: code_data
state: present
- name: Create code container
community.docker.docker_container:
name: code-server
image: lscr.io/linuxserver/code-server:latest
state: started
2024-04-25 16:48:40 +02:00
recreate: no
2024-04-17 00:50:20 +02:00
restart_policy: always
2024-04-25 17:05:52 +02:00
published_ports:
- "80:8443/tcp"
2024-04-17 00:50:20 +02:00
volumes:
- "code_data:/config"
2024-04-25 16:48:40 +02:00
2024-04-17 00:50:20 +02:00
env:
PASSWORD: "{{ passwd }}"
TZ: "Europe/Berlin"
PUID: "0"
PGID: "0"
DEFAULT_WORKSPACE: "/config/workspace"
2024-04-25 16:48:40 +02:00
PROXY_DOMAIN: "code.neuro.uni-bremen.de"
networks:
- name: codeNet
2024-04-25 17:06:15 +02:00
- name: bridge
2024-04-25 16:48:40 +02:00
comparisons:
networks: strict
- name: Create hitch container
community.docker.docker_container:
name: hitch
image: hitch
state: started
recreate: no
restart_policy: always
2024-04-17 00:50:20 +02:00
2024-04-25 16:48:40 +02:00
published_ports:
- "443:443/tcp"
2024-04-17 00:50:20 +02:00
2024-04-25 16:48:40 +02:00
env:
2024-04-25 17:03:17 +02:00
backend: "[code-server]:8443"
2024-04-17 00:50:20 +02:00
2024-04-25 16:48:40 +02:00
networks:
- name: codeNet
- name: bridge
comparisons:
networks: strict