Skip to content
Snippets Groups Projects
Verified Commit dc0f4655 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

Remove our two borg hosts from the inventory

These are managed services and Ansible doesn't run on them. It got
boring writing 'all,!rsync_net,!hetzner_storageboxes' in playbooks
and ad-hoc commands, so remove these borg hosts from our inventory.
parent 6741138b
No related branches found
No related tags found
1 merge request!540Remove our two borg hosts from the inventory
......@@ -2,12 +2,6 @@
secure-runner1.archlinux.org
gemini.archlinux.org
[rsync_net]
zh1905.rsync.net
[hetzner_storageboxes]
u236610.your-storagebox.de
[packet_net]
runner2.archlinux.org
repro1.pkgbuild.com
......@@ -47,10 +41,6 @@ md.archlinux.org
lists.archlinux.org
gluebuddy.archlinux.org
[borg_hosts]
zh1905.rsync.net
u236610.your-storagebox.de
[public_html]
homedir.archlinux.org
......
---
- name: basic setup for all hosts
hosts: all,!hetzner_storageboxes,!rsync_net
hosts: all
remote_user: root
roles:
- { role: common }
......
---
- name: fetch ssh hostkeys
hosts: all,!rsync_net,!hetzner_storageboxes
hosts: all
tasks:
- name: fetch hostkey checksums
shell: "for type in sha256 md5; do for file in /etc/ssh/ssh_host_*.pub; do ssh-keygen -l -f $file -E $type; done; echo; done"
......@@ -23,16 +23,16 @@
- name: store hostkeys
copy:
dest: "{{ playbook_dir }}/../../docs/ssh-hostkeys.txt"
content: "{% for host in query('inventory_hostnames', 'all,!rsync_net,!hetzner_storageboxes,!localhost') | sort %}# {{ host }}\n{{ hostvars[host].ssh_hostkeys.stdout }}\n\n{% endfor %}"
content: "{% for host in query('inventory_hostnames', 'all,!localhost') | sort %}# {{ host }}\n{{ hostvars[host].ssh_hostkeys.stdout }}\n\n{% endfor %}"
mode: preserve
- name: store known_hosts
blockinfile:
path: "{{ playbook_dir }}/../../docs/ssh-known_hosts.txt"
block: "\n{% for host in query('inventory_hostnames', 'all,!rsync_net,!hetzner_storageboxes,!localhost') | sort %}# {{ host }}\n{{ hostvars[host].known_hosts.stdout }}\n\n{% endfor %}"
block: "\n{% for host in query('inventory_hostnames', 'all,!localhost') | sort %}# {{ host }}\n{{ hostvars[host].known_hosts.stdout }}\n\n{% endfor %}"
- name: upload known_hosts to all nodes
hosts: all,!rsync_net,!hetzner_storageboxes
hosts: all
tasks:
- name: upload known_hosts
copy: dest=/etc/ssh/ssh_known_hosts src="{{ playbook_dir }}/../../docs/ssh-known_hosts.txt" owner=root group=root mode=0644
......
---
- name: upgrade and reboot all hetzner servers
hosts: all,!kape_servers,!packet_net,!rsync_net,!hetzner_storageboxes
hosts: all,!kape_servers,!packet_net
max_fail_percentage: 0
serial: 20%
gather_facts: false
......
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