Skip to content

Instantly share code, notes, and snippets.

@SethosII
SethosII / reboot.yaml
Last active June 8, 2017 20:32
Ansible tasks to reboot hosts and wait for them to come back. Originally from https://support.ansible.com/hc/en-us/articles/201958037-Reboot-a-server-and-wait-for-it-to-come-back, but this article is no longer available. See also https://sethosii.github.io/2017/04/29/ansbile-reboot.html.
- name: "reboot hosts"
shell: "sleep 2 && shutdown -r now 'Reboot triggered by Ansible'" # sleep 2 is needed, else this task might fail
async: "1" # run asynchronously
poll: "0" # don't ask for the status of the command, just fire and forget
ignore_errors: yes # this command will get cut off by the reboot, so ignore errors
- name: "wait for hosts to come up again"
wait_for:
host: "{{ inventory_hostname }}"
port: "22" # wait for ssh as this is what is needed for ansible
state: "started"
@SethosII
SethosII / cleanup-ansible-backups.sh
Last active July 29, 2017 14:52
Ansible has the option to create backup files when something is changed. All of them have a suffix with the same structure.
# the regex is basically everything ending with: .arbitrarynumber.YYYY-MM-DD@hh:mm:ss~
sudo find / -regextype egrep -regex '.*.[0-9]*.[0-9]{4}-[0-9]{2}-[0-9]{2}@[0-9]{2}:[0-9]{2}:[0-9]{2}~' | xargs -n 1 rm
@SethosII
SethosII / xkcd.sh
Last active November 16, 2019 20:39
Download all of the xkcd comics
#!/bin/bash
TOTAL=$(curl https://xkcd.com/info.0.json 2> /dev/null | grep -Po '"num": [0-9]+' | grep -Po '[0-9]+')
# download JSON and image file
echo "downloading ..."
for i in $(seq 1 $TOTAL)
do
echo -ne "\r$i/$TOTAL"
@SethosII
SethosII / easybuild_test_report_11843_easybuilders_preasybuild-easyconfigs_20204108-UTC-08-41-12.md
Created December 8, 2020 08:41
EasyBuild test report for easybuilders/easybuild-easyconfigs PR #11843

Test report for easybuilders/easybuild-easyconfigs#11843

Test result

Build succeeded for 1 out of 1 (1 easyconfigs in total)

Overview of tested easyconfigs (in order)

  • SUCCESS freebayes-1.3.2-foss-2018b.eb

Time info

  • start: Tue, 08 Dec 2020 08:31:04 +0000 (UTC)
@SethosII
SethosII / easybuild_test_report_11843_easybuilders_preasybuild-easyconfigs_20211208-UTC-14-12-38.md
Created January 8, 2021 14:12
EasyBuild test report for easybuilders/easybuild-easyconfigs PR #11843

Test report for easybuilders/easybuild-easyconfigs#11843

Test result

Build succeeded for 1 out of 1 (1 easyconfigs in total)

Overview of tested easyconfigs (in order)

  • SUCCESS freebayes-1.3.2-foss-2018b.eb

Time info

  • start: Fri, 08 Jan 2021 14:01:39 +0000 (UTC)
@SethosII
SethosII / easybuild_test_report_11843_easybuilders_preasybuild-easyconfigs_20213108-UTC-14-31-35.md
Created January 8, 2021 14:31
EasyBuild test report for easybuilders/easybuild-easyconfigs PR #11843

Test report for easybuilders/easybuild-easyconfigs#11843

Test result

Build succeeded for 1 out of 1 (1 easyconfigs in total)

Overview of tested easyconfigs (in order)

  • SUCCESS freebayes-1.3.2-foss-2018b.eb

Time info

  • start: Fri, 08 Jan 2021 14:21:31 +0000 (UTC)
@SethosII
SethosII / easybuild_test_report_11843_easybuilders_preasybuild-easyconfigs_20210711-UTC-15-07-06.md
Created January 11, 2021 15:07
EasyBuild test report for easybuilders/easybuild-easyconfigs PR #11843

Test report for easybuilders/easybuild-easyconfigs#11843

Test result

Build succeeded for 1 out of 1 (1 easyconfigs in total)

Overview of tested easyconfigs (in order)

  • SUCCESS freebayes-1.3.2-foss-2018b.eb

Time info

  • start: Mon, 11 Jan 2021 14:43:28 +0000 (UTC)
@SethosII
SethosII / easybuild_test_report_15261_easybuilders_preasybuild-easyconfigs_20225308-UTC-12-53-48.md
Created April 8, 2022 12:53
EasyBuild test report for easybuilders/easybuild-easyconfigs PR(s) #15261

Test report for PR(s) easybuilders/easybuild-easyconfigs#15261

Test result

Build succeeded for 2 out of 2 (1 easyconfigs in total)

Overview of tested easyconfigs (in order)

  • SUCCESS libdeflate-1.8-GCCcore-11.2.0.eb
  • SUCCESS StringTie-2.2.1-GCC-11.2.0.eb

Time info

@SethosII
SethosII / easybuild_test_report_15310_easybuilders_preasybuild-easyconfigs_20225027-UTC-09-50-50.md
Created April 27, 2022 09:50
EasyBuild test report for easybuilders/easybuild-easyconfigs PR(s) #15310

Test report for PR(s) easybuilders/easybuild-easyconfigs#15310

Test result

Build succeeded for 3 out of 3 (2 easyconfigs in total)

Overview of tested easyconfigs (in order)

  • SUCCESS GDGraph-1.54-GCCcore-11.2.0-Perl-5.34.0.eb
  • SUCCESS BWA-0.7.17-GCCcore-11.2.0.eb
  • SUCCESS FastQ_Screen-0.15.2-GCC-11.2.0-Perl-5.34.0.eb
@SethosII
SethosII / MaxQuant-2.1.0.0_partial.log
Created August 23, 2022 08:52
(partial) EasyBuild log for failed build of /tmp/eb-0j_kr1p1/files_pr16078/m/MaxQuant/MaxQuant-2.1.0.0.eb (PR(s) #16078)
== 2022-08-23 10:52:19,208 easyblock.py:303 INFO This is EasyBuild 4.6.0 (framework: 4.6.0, easyblocks: 4.6.0) on host ribnode012.
== 2022-08-23 10:52:19,208 easyblock.py:309 INFO This is easyblock Tarball from module easybuild.easyblocks.generic.tarball (/mnt/software/easybuild/20.04/software/EasyBuild/4.6.0/lib/python3.8/site-packages/easybuild/easyblocks/generic/tarball.py)
== 2022-08-23 10:52:19,208 easyblock.py:982 INFO Build dir set to /dev/shm/MaxQuant/2.1.0.0/system-system
== 2022-08-23 10:52:19,208 config.py:661 DEBUG software install path as specified by 'installpath' and 'subdir_software': /dev/shm/easybuild/software
== 2022-08-23 10:52:19,208 easyconfig.py:2637 DEBUG Determining software installation subdir for MaxQuant EasyConfig @ /tmp/eb-0j_kr1p1/files_pr16078/m/MaxQuant/MaxQuant-2.1.0.0.eb
== 2022-08-23 10:52:19,208 easyconfig.py:2640 DEBUG Using fixed naming software installation subdir: MaxQuant/2.1.0.0
== 2022-08-23 10:52:19,209 easyblock.py:1039 INFO Software install dir set to /dev/shm/ea