Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78a370dbd1 | ||
|
|
f67edd7a07 | ||
|
|
7464f4da0a |
@@ -19,6 +19,14 @@
|
|||||||
dest: /etc/apt/keyrings/crowdsec.asc
|
dest: /etc/apt/keyrings/crowdsec.asc
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
|
# A deb822 crowdsec.sources (written by the package or by hand) already
|
||||||
|
# defines the repository; a second crowdsec.list makes apt warn about
|
||||||
|
# duplicate targets.
|
||||||
|
- name: Check for an existing deb822 CrowdSec apt source
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: /etc/apt/sources.list.d/crowdsec.sources
|
||||||
|
register: crowdsec_sources
|
||||||
|
|
||||||
- name: Add the CrowdSec apt repository
|
- name: Add the CrowdSec apt repository
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/apt/sources.list.d/crowdsec.list
|
dest: /etc/apt/sources.list.d/crowdsec.list
|
||||||
@@ -28,6 +36,7 @@
|
|||||||
https://packagecloud.io/crowdsec/crowdsec/{{ ansible_distribution | lower }}/
|
https://packagecloud.io/crowdsec/crowdsec/{{ ansible_distribution | lower }}/
|
||||||
{{ crowdsec.apt_suite_map[ansible_distribution_release] | default(ansible_distribution_release) }} main
|
{{ crowdsec.apt_suite_map[ansible_distribution_release] | default(ansible_distribution_release) }} main
|
||||||
register: crowdsec_repo
|
register: crowdsec_repo
|
||||||
|
when: not crowdsec_sources.stat.exists
|
||||||
|
|
||||||
# The postinst asks these; without them it registers a local machine for a
|
# The postinst asks these; without them it registers a local machine for a
|
||||||
# local LAPI and enrols in the central CAPI.
|
# local LAPI and enrols in the central CAPI.
|
||||||
|
|||||||
@@ -23,12 +23,14 @@ spec:
|
|||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
containers:
|
containers:
|
||||||
- name: routingtabletowg
|
- name: routingtabletowg
|
||||||
image: "ruakij/routingtabletowg:0.2.0"
|
image: "ghcr.io/ruakij/routingtabletowg:0.3.0@sha256:a2c505e0f716dbbfdda1a535e2631e5a73b64236cd68d459eb407beab2e1032e"
|
||||||
env:
|
env:
|
||||||
- name: INTERFACE
|
- name: INTERFACE
|
||||||
value: {{ kubernetes.ipPool.nodeIp_interface }}
|
value: {{ kubernetes.ipPool.nodeIp_interface }}
|
||||||
- name: FILTER_PROTOCOL
|
- name: FILTER_PROTOCOL
|
||||||
value: bird
|
value: bird
|
||||||
|
- name: FILTER_TABLE
|
||||||
|
value: main
|
||||||
- name: PERIODIC_SYNC
|
- name: PERIODIC_SYNC
|
||||||
value: '300'
|
value: '300'
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|||||||
@@ -8,4 +8,7 @@
|
|||||||
url: https://github.com/Ruakij/wg-ipv6-converter/releases/{{ versionUri }}/wg-ipv6-converter_{{ arch }}
|
url: https://github.com/Ruakij/wg-ipv6-converter/releases/{{ versionUri }}/wg-ipv6-converter_{{ arch }}
|
||||||
dest: /usr/local/bin/wg-ipv6-converter
|
dest: /usr/local/bin/wg-ipv6-converter
|
||||||
mode: "744"
|
mode: "744"
|
||||||
|
# Replaces a differing binary (get_url keeps an existing dest without a
|
||||||
|
# checksum) and verifies the download.
|
||||||
|
checksum: "sha256:https://github.com/Ruakij/wg-ipv6-converter/releases/{{ versionUri }}/SHA256SUMS"
|
||||||
register: deployDownload
|
register: deployDownload
|
||||||
|
|||||||
@@ -3,5 +3,10 @@
|
|||||||
# interface without its IPv6 addresses. Start it again whenever
|
# interface without its IPv6 addresses. Start it again whenever
|
||||||
# {{ wireguard_ipv6_converter.service.bindTo }} starts. --no-block because the converter orders
|
# {{ wireguard_ipv6_converter.service.bindTo }} starts. --no-block because the converter orders
|
||||||
# itself After={{ wireguard_ipv6_converter.service.bindTo }}.
|
# itself After={{ wireguard_ipv6_converter.service.bindTo }}.
|
||||||
|
# Upholds= additionally restarts the converter whenever it stops while
|
||||||
|
# {{ wireguard_ipv6_converter.service.bindTo }} is active, e.g. after it exhausted its start limit.
|
||||||
|
[Unit]
|
||||||
|
Upholds=wg-ipv6-converter_{{ wireguard_ipv6_converter.setup.interface }}.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStartPost=/bin/systemctl --no-block start wg-ipv6-converter_{{ wireguard_ipv6_converter.setup.interface }}.service
|
ExecStartPost=/bin/systemctl --no-block start wg-ipv6-converter_{{ wireguard_ipv6_converter.setup.interface }}.service
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ RestartSec=30
|
|||||||
|
|
||||||
Environment="INTERFACE={{ wireguard_ipv6_converter.setup.interface }}"
|
Environment="INTERFACE={{ wireguard_ipv6_converter.setup.interface }}"
|
||||||
{% if wireguard_ipv6_converter.setup.ipv6_format is defined %}
|
{% if wireguard_ipv6_converter.setup.ipv6_format is defined %}
|
||||||
Environment="IPV6_FORMAT={{ wireguard_ipv6_converter.setup.ipv6_format }}"
|
{# systemd expands specifiers in Environment=, so every % must be doubled. #}
|
||||||
|
Environment="IPV6_FORMAT={{ wireguard_ipv6_converter.setup.ipv6_format | replace('%', '%%') }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if wireguard_ipv6_converter.setup.filter_prefix is defined %}
|
{% if wireguard_ipv6_converter.setup.filter_prefix is defined %}
|
||||||
Environment="FILTER_PREFIX={{ wireguard_ipv6_converter.setup.filter_prefix }}"
|
Environment="FILTER_PREFIX={{ wireguard_ipv6_converter.setup.filter_prefix }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user