2024-11-16 11:16:54 +01:00
|
|
|
- name: Create the home volume
|
2024-11-17 16:34:32 +01:00
|
|
|
tags: active
|
2024-11-16 11:16:54 +01:00
|
|
|
hosts: localhost
|
|
|
|
|
connection: local
|
2024-11-16 18:55:47 +01:00
|
|
|
roles:
|
|
|
|
|
- storage
|
2024-11-16 11:16:54 +01:00
|
|
|
|
2024-11-12 14:08:53 +01:00
|
|
|
- name: Create BSDNIX Servers
|
2024-11-17 16:34:32 +01:00
|
|
|
tags: active
|
2024-11-12 14:08:53 +01:00
|
|
|
hosts: vps
|
|
|
|
|
connection: local
|
|
|
|
|
gather_facts: False
|
|
|
|
|
user: root
|
|
|
|
|
roles:
|
|
|
|
|
- role: install
|
|
|
|
|
|
|
|
|
|
# during testing the ip addresses change all the time, so tune the
|
|
|
|
|
# known_hosts file accordingly after setup
|
|
|
|
|
- name: Add/cleanup public keys of all vps' to known_hosts file
|
2024-11-17 16:34:32 +01:00
|
|
|
tags: active
|
2024-11-12 14:08:53 +01:00
|
|
|
hosts: localhost
|
|
|
|
|
connection: local
|
|
|
|
|
gather_facts: false
|
|
|
|
|
vars:
|
|
|
|
|
ssh_known_hosts_file: "{{ lookup('env','HOME') + '/.ssh/known_hosts' }}"
|
|
|
|
|
ssh_known_hosts: "{{ groups['running'] }}"
|
|
|
|
|
tasks:
|
2024-11-17 16:34:32 +01:00
|
|
|
- shell: "ssh-keygen -f '/home/scip/.ssh/known_hosts' -R {{ item }}"
|
2024-11-12 14:08:53 +01:00
|
|
|
loop: "{{ ssh_known_hosts | map('extract', hostvars, ['ipv6']) | list }}"
|