forked from planetary-social/ansible-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpubs.yml
41 lines (38 loc) · 1.12 KB
/
pubs.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
39
40
41
---
# A playbook to deploy all of Planetary's pub infrastructure on existing DigitalOcean droplets.
- name: Create temp intall path for gcloud-cli role
hosts: localhost
connection: local
gather_facts: no
tasks:
- name: Create a tmp path
file:
path: "/tmp/install_gcloud"
state: directory
mode: 0777
- name: Pub Servers
hosts: pubs
gather_facts: no
serial: 2 # rolling update, don't bring all pubs 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
- gcloud-cli
- blob-reporter
- ssb-server