-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from srobo/clatd
Add role to install clatd
- Loading branch information
Showing
7 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
roles: | ||
- competitor-services-nginx | ||
- code-submitter | ||
- clatd | ||
- discord-bot | ||
|
||
- name: Kit services | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# [`clatd`](https://github.com/toreanderson/clatd) | ||
|
||
A CLAT / SIIT-DC Edge Relay implementation for Linux. | ||
|
||
Used to provide IPv4 outbound connectivity to an IPv6-only VM. | ||
|
||
It's likely `clat-v6-addr` will need to be configured to assign the correct IP to the created `clat` interface. This may require an additional IPv6 address be routed to the VM. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- name: Restart clatd | ||
service: | ||
name: clatd | ||
state: restarted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
- name: Download | ||
git: | ||
repo: https://github.com/toreanderson/clatd | ||
dest: "{{ install_dir }}" | ||
force: true | ||
version: 3ea303b5210bf701df30323933c86f9ffe4d3dd4 | ||
register: clatd_repo | ||
notify: Restart clatd | ||
|
||
- name: Get installed version (if installed) | ||
slurp: | ||
src: "{{ installed_version_file }}" | ||
ignore_errors: true # Ignore if the file is missing, since it's about to be created | ||
register: installed_version_slurp | ||
|
||
- name: Resolve installed version | ||
set_fact: | ||
installed_version: "{{ installed_version_slurp.content | b64decode }}" | ||
when: not installed_version_slurp.failed | ||
|
||
- name: Install | ||
community.general.make: | ||
chdir: "{{ install_dir }}" | ||
targets: | ||
- installdeps # Install system dependencies | ||
- install # Install clatd | ||
when: installed_version is not defined or clatd_repo.after not in installed_version # noqa: no-handler - Use a handler to ensure execution order | ||
notify: Restart clatd | ||
register: install_clatd | ||
|
||
- name: Update installed version | ||
copy: | ||
content: "{{ clatd_repo.after }}" | ||
dest: "{{ installed_version_file }}" | ||
mode: "0644" | ||
when: install_clatd.changed # noqa: no-handler - Use a handler to ensure execution order | ||
|
||
- name: Install configuration | ||
template: | ||
src: clatd.conf | ||
dest: /etc/clatd.conf | ||
mode: "0644" | ||
notify: Restart clatd | ||
|
||
- name: Enable service | ||
service: | ||
name: clatd | ||
state: started | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% if clat_v6_addr is defined %} | ||
clat-v6-addr={{ clat_v6_addr }} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
install_dir: /opt/clatd | ||
installed_version_file: /opt/clatd.version |