From f6f9a71c0a1d11e1f450ebd87d8cce0d8cdd4ddd Mon Sep 17 00:00:00 2001 From: David Rotermund Date: Wed, 17 Apr 2024 00:50:20 +0200 Subject: [PATCH] Add files via upload --- install_code.yaml | 51 +++++++++++++++++++++++++++++ install_semaphore.yaml | 74 ++++++++++++++++++++++++++++++++++++++++++ machines/code | 1 + machines/cups | 1 + machines/dns | 1 + machines/semaphore | 1 + 6 files changed, 129 insertions(+) create mode 100644 install_code.yaml create mode 100644 machines/code create mode 100644 machines/cups create mode 100644 machines/dns create mode 100644 machines/semaphore diff --git a/install_code.yaml b/install_code.yaml new file mode 100644 index 0000000..469e96c --- /dev/null +++ b/install_code.yaml @@ -0,0 +1,51 @@ +--- +- name: install ansible semaphore + 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 + + - 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 + recreate: yes + restart_policy: always + + volumes: + - "code_data:/config" + published_ports: + - "80:8443/tcp" + env: + PASSWORD: "{{ passwd }}" + TZ: "Europe/Berlin" + PUID: "0" + PGID: "0" + DEFAULT_WORKSPACE: "/config/workspace" + + + diff --git a/install_semaphore.yaml b/install_semaphore.yaml index 38986a0..8bf3ee2 100644 --- a/install_semaphore.yaml +++ b/install_semaphore.yaml @@ -90,6 +90,78 @@ volumes: - "semaphore_maria_db:/var/lib/mysql" + - name: set smtpd_pre.conf + blockinfile: + path: /root/opensmtpd/smtpd_pre.conf + state: present + create: true + owner: "root" + group: "root" + mode: "0644" + block: | + listen on 0.0.0.0 + listen on :: + + table aliases file:/etc/smtpd/aliases + + queue ttl 4d + bounce warn-interval 1h, 6h, 2d + smtp max-message-size 35M + + table authinfo db:/etc/smtpd/authinfo.db + action default relay host "smtps://user@mailhost.neurotec.uni-bremen.de:465" auth tls no-verify + match from any for any action default + + - name: Create a volume smtpd_spool + community.docker.docker_volume: + name: smtpd_spool + state: present + + - name: Create OpenSMTPd + community.docker.docker_container: + name: smtpd + image: wodby/opensmtpd + state: started + recreate: no + restart_policy: always + published_ports: + - "25:25/tcp" + env: + RELAY_HOST: "XXX" + RELAY_PROTO: "smtps" + RELAY_PORT: "XXX" + RELAY_USER: "{{ EMAIL__USERNAME }}" + RELAY_PASSWORD: "{{ EMAIL__PASSWORD }}" + + volumes: + - "/root/opensmtpd/smtpd_pre.conf:/etc/gotpl/smtpd.conf.tmpl" + - "smtpd_spool:/var/spool/smtpd" + + networks: + - name: semaphoreNet + - name: bridge + comparisons: + networks: strict + + - name: install mailx + dnf: + name: "mailx,telnet,sendmail" + state: latest + update_cache: true + skip_broken: true + nobest: false + allowerasing: true + + - name: esmtprc + blockinfile: + path: /etc/esmtprc + state: present + create: true + block: | + hostname = 127.0.0.1:25 + mda "/usr/bin/procmail -d %T" + + - name: Create volume semaphore_etc community.docker.docker_volume: name: semaphore_etc @@ -136,6 +208,8 @@ SEMAPHORE_LDAP_ACTIVATED: 'no' + ANSIBLE_HOST_KEY_CHECKING: "False" + TZ: "Europe/Berlin" networks: diff --git a/machines/code b/machines/code new file mode 100644 index 0000000..40e3506 --- /dev/null +++ b/machines/code @@ -0,0 +1 @@ +10.10.0.10 diff --git a/machines/cups b/machines/cups new file mode 100644 index 0000000..f9d79fe --- /dev/null +++ b/machines/cups @@ -0,0 +1 @@ +cups.neuro.uni-bremen.de \ No newline at end of file diff --git a/machines/dns b/machines/dns new file mode 100644 index 0000000..d502479 --- /dev/null +++ b/machines/dns @@ -0,0 +1 @@ +10.10.0.5 diff --git a/machines/semaphore b/machines/semaphore new file mode 100644 index 0000000..250c99e --- /dev/null +++ b/machines/semaphore @@ -0,0 +1 @@ +semaphore.neuro.uni-bremen.de