mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-27 08:15:54 +02:00
Update to 2022-09-08 18:00
This commit is contained in:
@@ -180,7 +180,7 @@ nomad_base_conf:
|
||||
# address: http://localhost:8500
|
||||
# allow_unauthenticated: True
|
||||
# tags: []
|
||||
ssl: "{{ (consul_conf is defined and consul_conf.tls is defined and consul_conf.tls.enabled is defined and consul_conf.tls.enabled) | ternary(True, False) }}"
|
||||
ssl: False
|
||||
ca_file: "{{ nomad_root_dir }}/tls/consul_ca.crt"
|
||||
cert_file: "{{ nomad_root_dir }}/tls/consul.crt"
|
||||
key_file: "{{ nomad_root_dir }}/tls/consul.key"
|
||||
|
@@ -168,6 +168,6 @@
|
||||
- what: issuing_ca
|
||||
where: consul_ca.crt.tpl
|
||||
notify: restart consul-template-nomad
|
||||
when: nomad_vault_secrets.consul_pki.enabled and nomad_conf.client.enabled and nomad_conf.consul.ssl
|
||||
when: nomad_vault_secrets.consul_pki.enabled and nomad_conf.consul.ssl
|
||||
tags: nomad
|
||||
|
||||
|
@@ -49,6 +49,11 @@
|
||||
- name: Link in /usr/local/bin
|
||||
file: src={{ nomad_root_dir }}/bin/nomad dest=/usr/local/bin/nomad state=link force=True
|
||||
|
||||
tags: nomad
|
||||
|
||||
- when: nomad_install_mode != 'none' and nomad_conf.client.enabled
|
||||
block:
|
||||
|
||||
- name: Download plugins
|
||||
get_url:
|
||||
url: "{{ nomad_plugins[item].archive_url }}"
|
||||
@@ -101,7 +106,7 @@
|
||||
content: |
|
||||
complete -C {{ nomad_root_dir }}/bin/nomad nomad
|
||||
dest: /etc/bash_completion.d/nomad
|
||||
mode: 755
|
||||
mode: 0644
|
||||
tags: nomad
|
||||
|
||||
- name: Deploy systemd service unit
|
||||
|
@@ -6,10 +6,10 @@
|
||||
state: "{{ (('tcp' in nomad_services[item].proto or 'udp' in nomad_services[item].proto) and nomad_services[item].src_ip | length > 0) | ternary('present', 'absent') }}"
|
||||
rules: |
|
||||
{% if 'tcp' in nomad_services[item].proto %}
|
||||
-A INPUT -m state --state NEW -p tcp --dport {{ nomad_services[item].port }} -s {{ nomad_services[item].src_ip | join(',') }} -j ACCEPT
|
||||
-A INPUT -m state --state NEW -p tcp --dport {{ nomad_services[item].port }} -s {{ nomad_services[item].src_ip | flatten | join(',') }} -j ACCEPT
|
||||
{% endif %}
|
||||
{% if 'udp' in nomad_services[item].proto %}
|
||||
-A INPUT -m state --state NEW -p udp --dport {{ nomad_services[item].port }} -s {{ nomad_services[item].src_ip | join(',') }} -j ACCEPT
|
||||
-A INPUT -m state --state NEW -p udp --dport {{ nomad_services[item].port }} -s {{ nomad_services[item].src_ip | flatten | join(',') }} -j ACCEPT
|
||||
{% endif %}
|
||||
loop: "{{ nomad_services.keys() | list }}"
|
||||
tags: firewall,nomad
|
||||
|
@@ -59,7 +59,7 @@ template {
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if nomad_vault_secrets.consul_pki.enabled and nomad_conf.client.enabled and nomad_conf.consul.ssl %}
|
||||
{% if nomad_vault_secrets.consul_pki.enabled and nomad_conf.consul.ssl %}
|
||||
template {
|
||||
source = "{{ nomad_root_dir }}/consul-template/consul.crt.tpl"
|
||||
left_delimiter = "[["
|
||||
|
@@ -23,7 +23,8 @@ Restart=on-failure
|
||||
LimitNOFILE=65536
|
||||
LimitNPROC=infinity
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
RestartSec=5
|
||||
StartLimitInterval=0
|
||||
TasksMax=infinity
|
||||
OOMScoreAdjust=-1000
|
||||
|
||||
|
Reference in New Issue
Block a user