Commit 5c24d3ae authored by Anthony Fullam's avatar Anthony Fullam 🇮🇪
Browse files

Initial commit

parent 8408f5f7
[defaults]
# Disable checking of keys when ssh'ing to unknown hosts
host_key_checking = False
interpreter_python=/g/bork3/home/fullam/miniconda3/envs/we/bin/python
[ssh_connection]
ssh_args= -o ServerAliveInterval=30
[py3-hosts:vars]
ansible_python_interpreter=/g/bork3/home/fullam/miniconda3/envs/we/bin/python
- name: Mongo DB Operations
hosts: eta
tasks:
- name: Add mailto to crontab
ansible.builtin.cron:
name: MAILTO
env: yes
job: anthony.fullam@embl.de
- name: Backup DB
ansible.builtin.cron:
name: "Backup DB"
weekday: "1"
hour: "5"
minute: "0"
job: "singularity run instance://mongo mongodump --quiet --uri=\"mongodb://mag_readwrite:password_mag_readwrite@127.0.0.1:26016\" -o /var/lib/mongo/backup/mags_`date '+%Y-%m-%d'` --gzip"
- name: Add new motus runs to db
ansible.builtin.cron:
name: "Add new motus runs to DB"
weekday: "1"
hour: "7"
minute: "0"
job: "/g/bork3/home/fullam/.cargo/bin/fd . /g/bork5/mocat/ngless-processing/motus-v2.5 --type d --max-depth 1 --changed-within 8d -x /g/bork3/home/fullam/miniconda3/envs/we/bin/python /g/scb2/bork/fullam/bin/crons/add_motus_run_to_db.py {}"
- name: INFO PORTAL Operations
hosts: theta
tasks:
- name: Add mailto to crontab
ansible.builtin.cron:
name: MAILTO
env: yes
job: anthony.fullam@embl.de
- name: Daily Update
ansible.builtin.cron:
name: "Daily Update"
hour: "23"
minute: "0"
job: "/g/scb2/bork/fullam/bin/crons/daily_update_info_portal.sh"
- name: Weekly Update
ansible.builtin.cron:
name: "Weekly Update"
weekday: "6"
hour: "23"
minute: "0"
job: "/g/scb2/bork/fullam/bin/crons/weekly_update_info_portal.sh"
- name: ENA Watcher
ansible.builtin.cron:
name: "ENA Watcher"
weekday: "3"
hour: "0"
minute: "0"
job: "/g/bork3/home/fullam/miniconda3/envs/we/bin/python /g/scb2/bork/fullam/bin/crons/ena_watcher.py"
[servers]
alpha
beta
epsilon
eta
sigma
theta
upsilon
[micro_cluster]
m-micro ansible_host=micro
m-compute-0-0 ansible_host=compute-0-0 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q micro"'
m-compute-0-1 ansible_host=compute-0-1 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q micro"'
[upsilon_cluster]
u-upsilon ansible_host=upsilon
u-compute-0-0 ansible_host=compute-0-0 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q upsilon"'
u-compute-0-1 ansible_host=compute-0-1 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q upsilon"'
u-compute-0-2 ansible_host=compute-0-2 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q upsilon"'
u-compute-0-3 ansible_host=compute-0-3 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q upsilon"'
u-compute-0-4 ansible_host=compute-0-4 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q upsilon"'
u-compute-0-5 ansible_host=compute-0-5 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q upsilon"'
u-compute-0-6 ansible_host=compute-0-6 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q upsilon"'
u-compute-0-7 ansible_host=compute-0-7 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q upsilon"'
u-compute-0-8 ansible_host=compute-0-8 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q upsilon"'
u-compute-0-9 ansible_host=compute-0-9 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q upsilon"'
u-compute-0-10 ansible_host=compute-0-10 ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q upsilon"'
[mocat]
theta
[embl]
login.cluster.embl.de
- hosts: theta
vars:
ansible_user: mocat
tasks:
- cron:
name: MAILTO
env: yes
value: "mocat@embl.de"
- cron:
name: "TMPDIR cleanup"
minute: "0"
hour: "0"
weekday: "1"
job: "/g/bork3/home/mocat/projects/dotfiles/bin/cleanup_all_tmp.sh"
# set state to absent if you want to delete this rule from destination host
state : present
- hosts: upsilon-cluster
vars:
ansible_user: mocat
tasks:
- cron:
name: "Syncthing local"
special_time: "reboot"
job: "/g/bork3/home/mocat/projects/dotfiles/bin/syncthing-cluster"
# set state to absent if you want to delete this rule from destination host
state : present
- hosts: micro-cluster
vars:
ansible_user: mocat
tasks:
- cron:
name: "Syncthing local"
special_time: "reboot"
job: "/g/bork3/home/mocat/projects/dotfiles/bin/syncthing-cluster"
# set state to absent if you want to delete this rule from destination host
state : present
- name: Bash Profiles
hosts: servers
tasks:
- name: Copy bashrc to home
ansible.builtin.copy:
src: /g/bork3/home/fullam/.bashrc
dest: ~/.bashrc
mode: '0644'
backup: yes
- name: Copy bash_profile to home
ansible.builtin.copy:
src: /g/bork3/home/fullam/.bash_profile
dest: ~/.bash_profile
mode: '0644'
backup: yes
- name: Bash Profiles embl
hosts: embl
tasks:
- name: Copy bash_profile to home
ansible.builtin.copy:
src: /g/bork3/home/fullam/.bashrc
dest: ~/.bash_profile
mode: '0644'
backup: yes
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment