From c0dd2fb4184309d0fc490b2ff8e8ba98fa5df6d6 Mon Sep 17 00:00:00 2001 From: David Rotermund Date: Wed, 17 Apr 2024 22:57:11 +0200 Subject: [PATCH] Update 17 04 2024 --- install_repo.yaml | 78 +++++++++++++++++++++++ machines/ansible | 2 +- machines/check | 2 +- machines/cluster | 86 +++++++++++++------------- machines/code | 2 +- machines/crystal | 2 +- machines/cups | 2 +- machines/dns | 2 +- machines/gitlab | 2 +- machines/haggis | 2 +- machines/hawaii | 2 +- machines/host_dns | 2 +- machines/ldap | 2 +- machines/repo | 1 + machines/semaphore | 2 +- machines/slurm | 2 +- machines/takatuka | 2 +- machines/tea | 2 +- prepare_debian_installation_ansible.sh | 7 +++ yaml_sub/myrepo_data.yaml | 34 +++++----- 20 files changed, 161 insertions(+), 75 deletions(-) create mode 100644 install_repo.yaml create mode 100644 machines/repo create mode 100644 prepare_debian_installation_ansible.sh diff --git a/install_repo.yaml b/install_repo.yaml new file mode 100644 index 0000000..b3ef144 --- /dev/null +++ b/install_repo.yaml @@ -0,0 +1,78 @@ +--- +- name: install repo + 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 nfs tools + dnf: + name: nfs-utils,nfs-utils-coreos,nfsv4-client-utils,rpcbind + state: present + update_cache: true + skip_broken: true + nobest: false + allowerasing: true + + - name: Make sure rpcbind service unit is started + systemd_service: + enabled: true + state: started + name: rpcbind + + + - name: Mount /web + ansible.posix.mount: + src: 10.10.1.51:/volume1/web + path: /web + opts: rw,sync,hard,nolock + boot: true + state: mounted + fstype: nfs + + + - 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 httpd container + community.docker.docker_container: + name: httpd + image: httpd:alpine + state: started + recreate: yes + restart_policy: always + + volumes: + - "/web:/usr/local/apache2/htdocs/" + published_ports: + - "80:80/tcp" + + + diff --git a/machines/ansible b/machines/ansible index 1804dd5..41a727d 100644 --- a/machines/ansible +++ b/machines/ansible @@ -1 +1 @@ -ansible.neuro.uni-bremen.de +ansible.neuro.uni-bremen.de ansible_user=ansibleuser diff --git a/machines/check b/machines/check index d014e9d..96f6461 100644 --- a/machines/check +++ b/machines/check @@ -1,2 +1,2 @@ -check.neuro.uni-bremen.de +check.neuro.uni-bremen.de ansible_user=ansibleuser diff --git a/machines/cluster b/machines/cluster index 376411e..b8d4af6 100644 --- a/machines/cluster +++ b/machines/cluster @@ -1,43 +1,43 @@ -gate0 -gate1 -gate2 -gp3u1 -gp3u2 -gp4u1 -gp4u2 -gp4u3 -gp4u4 -gp4u5 -gp4u6 -gp4u7 -granat1 -granat2 -granat3 -granat4 -granat5 -granat6 -granat7 -granat8 -octopode -doppio -fatbastard -nc46 -nc47 -nc48 -nc49 -nc50 -nc51 -nc52 -nc53 -nc54 -nc55 -nc56 -nc57 -nc58 -nc59 -nc60 -nc61 -nc62 -nc63 -nc64 -nc66 +gate0 ansible_user=ansibleuser +gate1 ansible_user=ansibleuser +gate2 ansible_user=ansibleuser +gp3u1 ansible_user=ansibleuser +gp3u2 ansible_user=ansibleuser +gp4u1 ansible_user=ansibleuser +gp4u2 ansible_user=ansibleuser +gp4u3 ansible_user=ansibleuser +gp4u4 ansible_user=ansibleuser +gp4u5 ansible_user=ansibleuser +gp4u6 ansible_user=ansibleuser +gp4u7 ansible_user=ansibleuser +granat1 ansible_user=ansibleuser +granat2 ansible_user=ansibleuser +granat3 ansible_user=ansibleuser +granat4 ansible_user=ansibleuser +granat5 ansible_user=ansibleuser +granat6 ansible_user=ansibleuser +granat7 ansible_user=ansibleuser +granat8 ansible_user=ansibleuser +octopode ansible_user=ansibleuser +doppio ansible_user=ansibleuser +fatbastard ansible_user=ansibleuser +nc46 ansible_user=ansibleuser +nc47 ansible_user=ansibleuser +nc48 ansible_user=ansibleuser +nc49 ansible_user=ansibleuser +nc50 ansible_user=ansibleuser +nc51 ansible_user=ansibleuser +nc52 ansible_user=ansibleuser +nc53 ansible_user=ansibleuser +nc54 ansible_user=ansibleuser +nc55 ansible_user=ansibleuser +nc56 ansible_user=ansibleuser +nc57 ansible_user=ansibleuser +nc58 ansible_user=ansibleuser +nc59 ansible_user=ansibleuser +nc60 ansible_user=ansibleuser +nc61 ansible_user=ansibleuser +nc62 ansible_user=ansibleuser +nc63 ansible_user=ansibleuser +nc64 ansible_user=ansibleuser +nc66 ansible_user=ansibleuser diff --git a/machines/code b/machines/code index 40e3506..a920309 100644 --- a/machines/code +++ b/machines/code @@ -1 +1 @@ -10.10.0.10 +10.10.0.10 ansible_user=ansibleuser diff --git a/machines/crystal b/machines/crystal index 1101d32..d6bba8e 100644 --- a/machines/crystal +++ b/machines/crystal @@ -1 +1 @@ -crystal.neuro.uni-bremen.de \ No newline at end of file +crystal.neuro.uni-bremen.de ansible_user=ansibleuser \ No newline at end of file diff --git a/machines/cups b/machines/cups index f9d79fe..fbffaa7 100644 --- a/machines/cups +++ b/machines/cups @@ -1 +1 @@ -cups.neuro.uni-bremen.de \ No newline at end of file +cups.neuro.uni-bremen.de ansible_user=ansibleuser \ No newline at end of file diff --git a/machines/dns b/machines/dns index d502479..f1651e1 100644 --- a/machines/dns +++ b/machines/dns @@ -1 +1 @@ -10.10.0.5 +10.10.0.5 ansible_user=ansibleuser diff --git a/machines/gitlab b/machines/gitlab index 8e9148e..44b038c 100644 --- a/machines/gitlab +++ b/machines/gitlab @@ -1 +1 @@ -10.10.0.6 \ No newline at end of file +10.10.0.6 ansible_user=ansibleuser \ No newline at end of file diff --git a/machines/haggis b/machines/haggis index 47b2949..dabff20 100644 --- a/machines/haggis +++ b/machines/haggis @@ -1 +1 @@ -haggis.neuro.uni-bremen.de \ No newline at end of file +haggis.neuro.uni-bremen.de ansible_user=ansibleuser \ No newline at end of file diff --git a/machines/hawaii b/machines/hawaii index 7632785..fa92632 100644 --- a/machines/hawaii +++ b/machines/hawaii @@ -1 +1 @@ -hawaii.neuro.uni-bremen.de +hawaii.neuro.uni-bremen.de ansible_user=ansibleuser diff --git a/machines/host_dns b/machines/host_dns index d502479..f1651e1 100644 --- a/machines/host_dns +++ b/machines/host_dns @@ -1 +1 @@ -10.10.0.5 +10.10.0.5 ansible_user=ansibleuser diff --git a/machines/ldap b/machines/ldap index 7de558d..029a19e 100644 --- a/machines/ldap +++ b/machines/ldap @@ -1 +1 @@ -ldap.neuro.uni-bremen.de +ldap.neuro.uni-bremen.de ansible_user=ansibleuser diff --git a/machines/repo b/machines/repo new file mode 100644 index 0000000..2fd5d8a --- /dev/null +++ b/machines/repo @@ -0,0 +1 @@ +repo.neuro.uni-bremen.de ansible_user=ansibleuser \ No newline at end of file diff --git a/machines/semaphore b/machines/semaphore index 250c99e..cf44940 100644 --- a/machines/semaphore +++ b/machines/semaphore @@ -1 +1 @@ -semaphore.neuro.uni-bremen.de +semaphore.neuro.uni-bremen.de ansible_user=ansibleuser diff --git a/machines/slurm b/machines/slurm index 44f176c..d03c47d 100644 --- a/machines/slurm +++ b/machines/slurm @@ -1 +1 @@ -10.10.0.7 \ No newline at end of file +10.10.0.7 ansible_user=ansibleuser \ No newline at end of file diff --git a/machines/takatuka b/machines/takatuka index 398a312..c318d25 100644 --- a/machines/takatuka +++ b/machines/takatuka @@ -1 +1 @@ -takatuka.neuro.uni-bremen.de +takatuka.neuro.uni-bremen.de ansible_user=ansibleuser diff --git a/machines/tea b/machines/tea index f45947b..9cdab2b 100644 --- a/machines/tea +++ b/machines/tea @@ -1 +1 @@ -tea.neuro.uni-bremen.de +tea.neuro.uni-bremen.de ansible_user=ansibleuser diff --git a/prepare_debian_installation_ansible.sh b/prepare_debian_installation_ansible.sh new file mode 100644 index 0000000..7101c37 --- /dev/null +++ b/prepare_debian_installation_ansible.sh @@ -0,0 +1,7 @@ +apt-get update +apt install software-properties-common +add-apt-repository --yes --update ppa:ansible/ansible +apt install ansible + +apt install mc vi sshpass ssh-keygen inetutils-ping + diff --git a/yaml_sub/myrepo_data.yaml b/yaml_sub/myrepo_data.yaml index 57e0f38..816bcf7 100644 --- a/yaml_sub/myrepo_data.yaml +++ b/yaml_sub/myrepo_data.yaml @@ -10,103 +10,103 @@ block: | [FEDORACORE] name=Fedora Core $releasever - baseurl=http://10.10.1.1/repos/Fedora/$releasever/Fedora/os + baseurl=http://10.10.0.11/repos/Fedora/$releasever/Fedora/os enabled=1 gpgcheck=0 [FEDORAUPDATE] name=Fedora Update $releasever - baseurl=http://10.10.1.1/repos/Fedora/$releasever/Fedora_Update + baseurl=http://10.10.0.11/repos/Fedora/$releasever/Fedora_Update enabled=1 gpgcheck=0 [CUDA_37] name=NVidia Cuda 37 - baseurl=http://10.10.1.1/repos/Fedora/AllVersion/cuda_37 + baseurl=http://10.10.0.11/repos/Fedora/AllVersion/cuda_37 enabled=0 gpgcheck=0 [CUDA_36] name=NVidia Cuda 36 - baseurl=http://10.10.1.1/repos/Fedora/AllVersion/cuda_36 + baseurl=http://10.10.0.11/repos/Fedora/AllVersion/cuda_36 enabled=0 gpgcheck=0 [CUDA_35] name=NVidia Cuda 35 - baseurl=http://10.10.1.1/repos/Fedora/AllVersion/cuda_35 + baseurl=http://10.10.0.11/repos/Fedora/AllVersion/cuda_35 enabled=0 gpgcheck=0 [CUDA_RHEL8] name=NVidia Cuda RHEL 8 - baseurl=http://10.10.1.1/repos/Fedora/AllVersion/cuda_rhel8 + baseurl=http://10.10.0.11/repos/Fedora/AllVersion/cuda_rhel8 enabled=0 gpgcheck=0 [Google] name=Google - baseurl=http://10.10.1.1/repos/Fedora/AllVersion/google_64 + baseurl=http://10.10.0.11/repos/Fedora/AllVersion/google_64 enabled=1 gpgcheck=0 [oneAPI] name=oneAPI - baseurl=http://10.10.1.1/repos/Fedora/AllVersion/oneAPI + baseurl=http://10.10.0.11/repos/Fedora/AllVersion/oneAPI enabled=1 gpgcheck=0 [Opera] name=Opera - baseurl=http://10.10.1.1/repos/Fedora/AllVersion/opera/rpm.opera.com/rpm + baseurl=http://10.10.0.11/repos/Fedora/AllVersion/opera/rpm.opera.com/rpm enabled=1 gpgcheck=0 [RPMFusionFreeUpdate] name=RPM Fusion Free Update $releasever - baseurl=http://10.10.1.1/repos/Fedora/$releasever/fusion_free/ + baseurl=http://10.10.0.11/repos/Fedora/$releasever/fusion_free/ enabled=1 gpgcheck=0 [RPMFusionNonFreeUpdate] name=RPM Fusion Non Free Update $releasever - baseurl=http://10.10.1.1/repos/Fedora/$releasever/fusion_nonfree/ + baseurl=http://10.10.0.11/repos/Fedora/$releasever/fusion_nonfree/ enabled=1 gpgcheck=0 [RPMFusionFreeEverything] name=RPM Fusion Free Everything $releasever - baseurl=http://10.10.1.1/repos/Fedora/$releasever/fusion_free2/os + baseurl=http://10.10.0.11/repos/Fedora/$releasever/fusion_free2/os enabled=1 gpgcheck=0 [RPMFusionNonFreeEverything] name=RPM Fusion Non Free Everything $releasever - baseurl=http://10.10.1.1/repos/Fedora/$releasever/fusion_nonfree2/os + baseurl=http://10.10.0.11/repos/Fedora/$releasever/fusion_nonfree2/os enabled=1 gpgcheck=0 [SGE] name=SGE - baseurl=http://10.10.1.1/repos/Fedora/32/sge/copr-be.cloud.fedoraproject.org/results/loveshack/SGE/fedora-32-x86_64 + baseurl=http://10.10.0.11/repos/Fedora/32/sge/copr-be.cloud.fedoraproject.org/results/loveshack/SGE/fedora-32-x86_64 enabled=1 gpgcheck=0 [VSCode] name=VS Code - baseurl=http://10.10.1.1/repos/Fedora/AllVersion/vscode/packages.microsoft.com/yumrepos/vscode + baseurl=http://10.10.0.11/repos/Fedora/AllVersion/vscode/packages.microsoft.com/yumrepos/vscode enabled=1 gpgcheck=0 [zoom] name=zoom - baseurl=http://10.10.1.1/repos/Fedora/AllVersion/zoom + baseurl=http://10.10.0.11/repos/Fedora/AllVersion/zoom enabled=1 gpgcheck=0 [msedge] name=msedge - baseurl=http://10.10.1.1/repos/Fedora/AllVersion/edge/packages.microsoft.com/yumrepos/edge + baseurl=http://10.10.0.11/repos/Fedora/AllVersion/edge/packages.microsoft.com/yumrepos/edge enabled=1 gpgcheck=0