Skip to content

Commit 0f287f0

Browse files
committed
Overall deploy fixups.
1 parent 44a351b commit 0f287f0

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

playbooks/ipfs.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
---
2-
- name: Get sniffer heads
3-
hosts: sniffer
4-
tags:
5-
- get_sniffer_heads
6-
tasks:
7-
- name: Ensure sniffer heads available
2+
- name: Configure IPFS node and peerings
3+
hosts: ipfs
4+
become: true
5+
serial:
6+
- 1
7+
- "100%"
8+
pre_tasks:
9+
- name: Ensure sniffer heads are defined
810
when: sniffer_heads is not defined
11+
delegate_to: "{{ groups['sniffer'][0] }}"
12+
run_once: true
913
block:
1014
- name: Ensure sniffer service started
1115
systemd:
@@ -20,12 +24,6 @@
2024
set_fact:
2125
sniffer_heads: "{{ sniffer_heads_resp.content.splitlines() | map('from_json') }}"
2226
cacheable: yes
23-
- name: Configure IPFS node and peerings
24-
hosts: ipfs
25-
become: true
26-
serial:
27-
- 1
28-
- "100%"
2927
roles:
3028
- role: ipfs_search.ipfs.ipfs
3129
tags: ['ipfs']
@@ -116,6 +114,6 @@
116114
- role: ipfs_search.ipfs.ipfs_peering
117115
tags: ['ipfs_peering']
118116
vars:
119-
ipfs_extra_peers: "{{ hostvars[groups['sniffer'][0]].sniffer_heads[:1] }}"
117+
ipfs_extra_peers: "{{ sniffer_heads[:1] }}"
120118
- role: vendor/ipfs-gc
121119
tags: ipfs-gc

roles/vendor/ipfs-gateway/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
src: nginx-gateway.conf.j2
55
dest: /etc/nginx/sites-available/gateway.conf
66
mode: 0644
7-
notify: restart nginx
7+
notify: Restart nginx
88
- name: Enable nginx configuration
99
file:
1010
path: /etc/nginx/sites-enabled/gateway.conf
1111
src: /etc/nginx/sites-available/gateway.conf
1212
state: link
1313
mode: 0644
14-
notify: restart nginx
14+
notify: Restart nginx

0 commit comments

Comments
 (0)