summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ansible/radicle-other-node.yml24
1 files changed, 23 insertions, 1 deletions
diff --git a/ansible/radicle-other-node.yml b/ansible/radicle-other-node.yml
index 5f24b25..00abce7 100644
--- a/ansible/radicle-other-node.yml
+++ b/ansible/radicle-other-node.yml
@@ -67,13 +67,31 @@
WantedBy=default.target
dest: /lib/systemd/system/radicle-node.service
- - name: "enable systemd unit for Radicle node"
+ - name: "start systemd unit for Radicle node"
systemd:
name: radicle-node
state: restarted
masked: no
enabled: yes
daemon_reload: yes
+
+ # Ansible does not seem to always actually start the unit, so do
+ # it manually. This seems to only happen on the first run on a
+ # freshly created host.
+ - name: "actually start node"
+ shell: |
+ systemctl restart radicle-node
+ systemctl status radicle-node
+
+ - name: "connect to other Radicle nodes"
+ with_items: "{{ radicle_connections }}"
+ shell: |
+ cat <<'EOF' > connect.sh
+ export PATH="$HOME/.radicle/bin:$PATH"
+ rad node status
+ rad node connect "{{ item.nid }}@{{ item.host }}:{{ item.port }}"
+ EOF
+ sudo -u _rad bash -ex connect.sh
vars:
sane_debian_system_version: 2
sane_debian_system_hostname: "{{ inventory_hostname }}"
@@ -92,3 +110,7 @@
radicle_key: "{{ lookup('pipe', 'pass radicle/radicle-other-node/key') }}"
radicle_pub: "{{ lookup('pipe', 'pass radicle/radicle-other-node/key.pub') }}"
+ radicle_connections:
+ - nid: z6MkfXa53s1ZSFy8rktvyXt5ADCojnxvjAoQpzajaXyLqG5n
+ host: radicle.liw.fi
+ port: 8776