-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3a7d2a3
Showing
15 changed files
with
204 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
__pycache__ | ||
*.pyc | ||
*~ | ||
*- | ||
*.swp | ||
.DS_Store | ||
|
||
env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Potsdam Institute for Climate Impact Research | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Ansible playbook for data.isimip.org and files.isimip.org | ||
========================================================= | ||
|
||
This software is currently under development. | ||
|
||
Setup | ||
----- | ||
|
||
```bash | ||
python3 -m venv env | ||
source env/bin/activate | ||
pip install pip ansible | ||
``` | ||
|
||
|
||
Usage | ||
----- | ||
|
||
```bash | ||
./play | ||
./play -l data.isimip.org | ||
./play -l files.isimip.org | ||
./play -t config | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
data.isimip.org | ||
files.isimip.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
|
||
- name: all hosts | ||
hosts: all | ||
become: yes | ||
become_user: root | ||
roles: | ||
- role: config | ||
tags: ['config'] | ||
- role: ssh | ||
tags: ['ssh'] | ||
- role: packages | ||
tags: ['packages'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
ansible-playbook -i hosts $@ main.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
alias ls='ls --color=auto' | ||
alias ll='ls -lah' | ||
|
||
alias e='emacs' | ||
alias h='history' | ||
alias p='python' | ||
alias t='tail -f' | ||
alias grep='grep --color' | ||
|
||
alias gits='git status' | ||
alias gita='git add .' | ||
alias gitc='git commit -am' | ||
alias gitl='git log' | ||
alias gitb='git branch' | ||
alias gitd='git diff' | ||
alias gitu='git diff | grep -C 3 -f ~/.gitunwanted' | ||
|
||
alias sv='service' | ||
alias sd='sudo -i' | ||
alias ap='aptitude' | ||
|
||
alias ve='source env/bin/activate' | ||
alias ve3='source env3/bin/activate' | ||
alias de='deactivate' | ||
|
||
alias psg='ps auxw | grep --color' | ||
alias eng='env | grep --color' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(line-number-mode t) | ||
(column-number-mode t) | ||
|
||
(setq make-backup-files nil) | ||
(setq-default indent-tabs-mode nil) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
|
||
- name: red prompt for root | ||
lineinfile: dest=/root/.bashrc line="export PS1='[\[\e[0;31m\]\u@\h\[\e[0m\] \W]\$ '" | ||
|
||
- name: include .bash_aliases in /root/.bashrc | ||
lineinfile: dest=/root/.bashrc line="source /root/.bash_aliases" | ||
|
||
- name: /root/.bash_aliases | ||
copy: src=bash_aliases dest=/root/.bash_aliases | ||
|
||
- name: /root/.emacs | ||
copy: src=emacs dest=/root/.emacs | ||
|
||
- name: include .bash_aliases in /home/ubuntu/.bashrc | ||
lineinfile: dest=/home/ubuntu/.bashrc line="source /home/ubuntu/.bash_aliases" | ||
|
||
- name: /home/ubuntu/.bash_aliases | ||
copy: src=bash_aliases dest=/home/ubuntu/.bash_aliases | ||
|
||
- name: /home/ubuntu/.emacs | ||
copy: src=emacs dest=/home/ubuntu/.emacs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
|
||
- name: common packages are present | ||
apt: name="{{ packages }}" state=present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
packages: | ||
- aptitude | ||
- sudo | ||
- pwgen | ||
- screen | ||
- fail2ban | ||
- rsync | ||
|
||
# editor | ||
- vim | ||
- nano | ||
- emacs-nox | ||
|
||
# development | ||
- build-essential | ||
- cmake | ||
- git | ||
- subversion | ||
|
||
# compression | ||
- zip | ||
- unzip | ||
- bzip2 | ||
|
||
# monitoring | ||
- strace | ||
- dstat | ||
- htop | ||
- iotop | ||
- iftop | ||
- glances | ||
- iperf3 | ||
- iftop | ||
- ncdu | ||
|
||
# network | ||
- telnet | ||
- wget | ||
- curl | ||
- nmap | ||
|
||
# hardware | ||
- smartmontools | ||
- pciutils | ||
- ethtool | ||
- lsscsi | ||
- sysstat | ||
- pv | ||
- lsof | ||
- inxi | ||
|
||
# python | ||
- python3-dev | ||
- python3-pip | ||
- python3-venv | ||
|
||
# other | ||
- silversearcher-ag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCx+ffDErCmljYWvVAjPVKUHyjVJTZaSgdImNeyl0XBt5R5LRXBqp6TCigEIEfvz4do5nglZwOiKfNhaNH/+opBv5AQ0chYWlLK+jNlzkZZ4T2tXXpW4iIMq9gr1CpA1HatHndaDLyB6bG7vHakXufNsPNiVf2+pdB1VtgdyASmFEnf5R8CEhqUy8ciKXB0Ko8QxKD7gNYEVNWKvD+GRKFm1+9xD/OwXC2Sew+9MIjuZDLo9sXMhuZGrQdDe9ybq6yJgXQwjSI8hyms9WEQZKem8dairnOUhxTmM24erdQdfy6rWHeIkLIX5ZfbfCQuhLRWbtPcx1plgqEktqp2ufANJxtCB3+gYkEi17HSYWmRzR2giWqNCldE5VhPBFVFMjcnblX91D0mJfdKmqI5DoY7zL0E1RuuzwPYviCTpcol6a+ruxVK/igTPB0CCg0HvDvtg6rM/OMIxN3zwZA1jnpBBFcyIvv/2rHMgJAL1FIsWzGr5/uwD7Us/vrr1vUZFcd+yvrEY26yZ3yqOGPr33I14xdfc+lNY3c6GPhRdWz7IboVN+EhK83n1aAyV0uivZ2/432EIgIlsTilHI2XpHY6EkH2YstZunB0+UJSFnyhDvd2oAL+rcqtNM+heGj+f2PMqBmrsA1mrQRiBp85EXQJ9ssw9KyIdMX/y6fXSIEygw== jochen@klarbook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCnXRAVdcQ9sneyRDnn1qVUc9wpuee1e8JT+5XBYeKdSbQ0Usnn6MCfjGsErp3e4v6pCTmwwjU0SzPq5UBA3kvTI4hDO6He4CtdR1Pbgf/Z37x6XVyD6Cu05p+vgLhsNjPevOxbKNtzxuXdFn0OahpvMQ+mS1QLe7f4mwrSMa+AixfnxK6howMj2Kg1N6tfIDZeG5JB9RwFvx6V+hAK4Ge0xQXaWuwmLlwW7l48Or80hS60VGGUcGG3v6qfTgUJLoLH/pdOgHFeK8G+1/1LKzesqziBn1nBJPrw4AilIF0i7myKBcUkllYPlSSbjmC7YLEV2pVPZmphi8JUCnrgFnNZ0/0SwMUiFA2Waz+xL7cEfHzgxqS4fRWgywLkZUxvX2mz5hmQy6mQBrCuoU2euGf5IV9arcNmiFfhZXiAWGClnqN6Cf3hRRHR4EhZWlZfBjMmACti8oe+ozizxVCh0Py2t9ZlUa7GI2fa27a0gxyva5Dc0PHhreofkPcFaj07ZUlaqkj6xpA2c4Aw6DOlHKQ65ODfv7eQYBCfC2DwM3Uv/92OFGILdOpIMuruMcSzh6xNtDMYke5yNiTgZnQtJfpEOJ1uIjLrDu+vmYCm4SS2tRykb1zU87MhdJhekBISguTuM4alCnpDRyPnR2tEqOBmfl+M/Cf7F7w63a5DCBY12Q== jochen@klarpc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
- name: restart ssh | ||
service: name=ssh state="restarted" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
- name: ssh keys for root | ||
authorized_key: user=root key="{{ item }}" state=present | ||
with_file: | ||
- [email protected] | ||
- [email protected] | ||
|
||
- name: ssh keys for ubuntu | ||
authorized_key: user=ubuntu key="{{ item }}" state=present | ||
with_file: | ||
- [email protected] | ||
- [email protected] |