4b9e15a9e5
and reactor for rfxcom
17 lines
451 B
Plaintext
17 lines
451 B
Plaintext
{% set label = data['path'].split('/')[-1] -%}
|
|
{% if label in ['rfxtrx433'] -%}
|
|
{% if data['change'] == 'IN_CREATE' -%}
|
|
{% set label = label + '=true' -%}
|
|
{% else %}
|
|
{% set label = label +'-' -%}
|
|
{% endif -%}
|
|
{% set node = data['id'].split('.')[0] -%}
|
|
label_k3s_node_{{ node }}:
|
|
local.state.single:
|
|
- tgt: masters
|
|
- tgt_type: nodegroup
|
|
- args:
|
|
- fun: cmd.run
|
|
- name: "kubectl label node {{ node }} {{ label }}"
|
|
{% endif -%}
|