Skip to content
Snippets Groups Projects
Commit b011dc73 authored by Christian Elberfeld's avatar Christian Elberfeld
Browse files

basiskonfiguration, hostname, ssh keys, motd

parent 8109f2ee
No related branches found
No related tags found
No related merge requests found
all.yml 0 → 100644
---
# Playbook zur Konfiguration von allen Servern
- hosts: all
remote_user: root
roles:
- hostname
- common
# Globale Variablen für alle Server
# Host spezifische Variablen
administratorenteam:
- "void"
hosts 0 → 100644
# Webserver
webserver ansible_ssh_host=89.163.231.226
Hier werden die öffentlichen Schlüssel gespeichert.
ssh-dss AAAAB3NzaC1kc3MAAAEBAJkGM90LE4cheC4U5SvNu6d9ZOAgKTI6Gf6bV0xj/uQE7+9Qq2UxQdLOoNkT4Ee8lfssaN7b1cvnE/yULgjFsQgr5ReV9XoI0NDtT3EHjumrPVqmyfbErA7I0NR7xvR0wvLzHUNAK4dvx4PUNA/X1O3yMcaS6fH246jgeiRF5bFqcbMHqaO5D8+n6LkHujdpaiOhgk/Ob0sIq90G1KYJG0srragsIMsECnBHQ+AxSetWuncLazNOTmHtCTBvepKq88PDt3Q17JuRodsT8d0nC8T5Rxf2f3BEX2BRg8JUffESZNbkikX1V91H3yb5qE0LiDm4hYCtPIIhDNCcDzROe1UAAAAVANIIwqeBMMALtxCXkdQS9L1IHE0XAAABAQCCNPhUrWcZ1fF1v09mRO3HxDaKxDA5AXNQWstg9dymbMpckSduUsN+QmNkPrY/hZd4VCPzf3ODvlYrnTGeZUYEOPiEkEc22JBb6ixnFAvmTjFNSdHON6lUi1SoULwC5qm+CC+zI9l/B9D49tdYDPIBC/CHaT2VbyVe3aKjJtEOfGb1lKej60TFfFqbt60eUsvIIw7mUfBMveOhpN3sqnSqICRm63+qltlg964v1GTRWgy8/MO3mfxvSz+pjaiuHRy/CFWgVrN653Ugc4GkMMFtu3k+7Nj2DKa8ygbwz/KoQvnPMoiolslfIAmQTejuCea72VA7bgUSO+ODM6ADERzdAAABAGqu5DREpKpPdvHt1BLtp1xlTPXNwXCTkUqbTpUmIsZhB7I60LneHrrAkRANJ86wkOZXpdwpJOHbh5Chjtifjub7QT0RWuogSeklusFHlVnAGDt9zkBoIEG3JIAAr8V4wyTG+INxzbr8fbNkscRSQ2aiyC/9H51t41Pefc3hda48fQREzU86l2OKTPJjkTouQPn5+C4e/RsTwCZO3uCSyUR+TftWqcMdIEGmDU/p67RvS5JFTPQQrhOBwYN9YNqPcwF19/iBCQ06s5bZcOKA9RwWENzIjIZw5GL3BjVZlw6znT74PU/6+1YbrdVW702ZPeRYj/7qcNF1WKy+qNRcg/s= void-2013
---
# Allgemeine Konfigurationen für alle Server
- name: create motd file
template: src=motd.j2 dest=/etc/motd
- name: add default repo
#Freifunk- und Rollen-Repos erst in den jeweiligen Rollen
apt_repository:
repo: "{{ item }}"
state: present
with_items:
- "deb http://ftp.de.debian.org/debian/ {{ ansible_distribution_release }} main"
- "deb http://ftp.de.debian.org/debian/ {{ ansible_distribution_release }}-updates main"
- "deb http://security.debian.org/ {{ ansible_distribution_release }}/updates main"
when: ansible_distribution == "Debian"
- name: install common packages
apt:
pkg: "{{ item }}"
update_cache: yes
state: installed
with_items:
- vim
- wget
- vnstat
- tmux
- pastebinit
- name: add sshkeys for server
authorized_key:
user: root
key: "{{ lookup('file', 'keyfiles/' + item + '.pub') }}"
with_items: "{{ administratorenteam }}"
when: administratorenteam
\\ /\ // /\ ||=\\ ||=\\ ===// //=\\ |\\ || ||====
\\ //\\ // //\\ || || || || // // \\ ||\\ || ||
\\ // \\ // //==\\ ||=// ||=// // || || || \\ || ||====
\\// \\// // \\ || \\ || // \\ // || \\|| ||
\/ \/ // \\ || \\ || //=== \\=// || \|| ||====
Server: {{ ansible_hostname }}
Öffentliche IPs: {{ansible_eth0.ipv4.address}} / {{ansible_eth0.ipv6[0].address}}
---
# Set Hostname fron hostname in inventory
- name: deploy etc_hostname
template: src=hostname.j2 dest=/etc/hostname
{{ inventory_hostname }}
---
# Hauptdatei, includiert lediglich die einzelnen Playbooks
- include: all.yml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment