forked from planetary-social/ansible-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrooms.yml
38 lines (36 loc) · 1.22 KB
/
rooms.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
# A playbook to deploy all of Planetary's rooms servers on existing DigitalOcean droplets.
#
#
# NOTE: Planetary.name should not be deployed using this playbook as some custom changes were made
# to it to support a wildcard SSL cert for aliases.
# To change the code running on planetary.name you should:
# 1. `cd go-ssb-room`
# 2. `git stash`
# 3. check out the branch you want to deploy
# 4. `git stash pop`
# 5. `docker-compose down && docker-compose build . && docker-compose up -d`
- name: Room Servers
hosts: rooms
gather_facts: no
serial: 2 # rolling update, don't bring all down at once
pre_tasks:
# SSH Host key checking
# https://stackoverflow.com/a/54735937/982195
- name: Check known_hosts for {{ inventory_hostname }}
local_action: shell ssh-keygen -F {{ inventory_hostname }}
register: has_entry_in_known_hosts_file
failed_when: false
changed_when: false
ignore_errors: yes
- name: Ignore host key for {{ inventory_hostname }} on first run
when: has_entry_in_known_hosts_file.rc == 1
set_fact:
ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
- name: Gather Facts
setup:
roles:
- common
- digital-ocean
- docker
- ssb-room