forked from planetary-social/ansible-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplanetary-graphql.yml
30 lines (28 loc) · 915 Bytes
/
planetary-graphql.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
---
# A playbook to deploy planetary-graphql
- name: Planetary GraphQL
hosts: graphql
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
# - node-js
# NOTE node-js is only needed first time we run this playbook
- letsencrypt-nginx
- planetary-graphql