From b558472feb4ee5fd06248afa17932075fc27e6e1 Mon Sep 17 00:00:00 2001 From: David Rotermund Date: Thu, 18 Apr 2024 19:12:43 +0200 Subject: [PATCH] Update --- install_cluster_node.yaml | 62 +++++++++++++++++++++++++++++++ install_semaphore.yaml | 7 ++++ machines/udisoft | 1 + set_cluster_crontab.yaml | 9 +++++ yaml_sub/set_cluster_crontab.yaml | 15 ++++++++ 5 files changed, 94 insertions(+) create mode 100644 install_cluster_node.yaml create mode 100644 machines/udisoft create mode 100644 set_cluster_crontab.yaml create mode 100644 yaml_sub/set_cluster_crontab.yaml diff --git a/install_cluster_node.yaml b/install_cluster_node.yaml new file mode 100644 index 0000000..47d5058 --- /dev/null +++ b/install_cluster_node.yaml @@ -0,0 +1,62 @@ +--- +- name: install cluster stuff + hosts: all + become: true + + tasks: + - name: Install base system + include_tasks: yaml_sub/install_base_system.yaml + + - 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 movie tools + # dnf: + # name: mencoder,mmv,mplayer,HandBrake + # state: present + # update_cache: true + # skip_broken: true + # nobest: false + # allowerasing: true + + - name: make sure gdm is stopped + ansible.builtin.systemd_service: + name: gdm + state: stopped + enabled: false + + - name: make sure lxdm is started + ansible.builtin.systemd_service: + name: lxdm + state: started + enabled: true + + - name: set cluster crontab + include_tasks: yaml_sub/set_cluster_crontab.yaml + + - 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: Change default target to graphical.target + file: + src: /usr/lib/systemd/system/multi-user.target + dest: /etc/systemd/system/default.target + state: link + + - name: disable tracker + shell: 'for f in /etc/xdg/autostart/tracker*.desktop; do echo "Hidden=true" | tee -a "$f"; done' diff --git a/install_semaphore.yaml b/install_semaphore.yaml index 78f29e0..fbb6092 100644 --- a/install_semaphore.yaml +++ b/install_semaphore.yaml @@ -209,6 +209,13 @@ SEMAPHORE_LDAP_ACTIVATED: 'no' ANSIBLE_HOST_KEY_CHECKING: "False" + + email_alert: "true" + email_host: "smtpd" + email_port: "25" + email_sender: "Ansible Neuro ITP" + email_secure: "False" + TZ: "Europe/Berlin" diff --git a/machines/udisoft b/machines/udisoft new file mode 100644 index 0000000..803a706 --- /dev/null +++ b/machines/udisoft @@ -0,0 +1 @@ +udisoft.neuro.uni-bremen.de ansible_user=ansibleuser \ No newline at end of file diff --git a/set_cluster_crontab.yaml b/set_cluster_crontab.yaml new file mode 100644 index 0000000..efdf28b --- /dev/null +++ b/set_cluster_crontab.yaml @@ -0,0 +1,9 @@ +--- +- name: set cluster crontab + hosts: all + become: true + + tasks: + - name: set cluster crontab + include_tasks: yaml_sub/set_cluster_crontab.yaml + diff --git a/yaml_sub/set_cluster_crontab.yaml b/yaml_sub/set_cluster_crontab.yaml new file mode 100644 index 0000000..d504123 --- /dev/null +++ b/yaml_sub/set_cluster_crontab.yaml @@ -0,0 +1,15 @@ +--- + - name: set new crontab + blockinfile: + path: /root/new_crontab.txt + state: present + create: true + owner: "root" + group: "root" + mode: "0644" + block: | + * * * * * sh /home/doomsdaydevice/doomsdaydevice.sh + */5 * * * * sh /sge-root/sge_heatbeat.sh + + - name: set crontab + shell: "crontab /root/new_crontab.txt" \ No newline at end of file