mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
move off of cmd.script with args \
https://github.com/saltstack/salt/issues/68298
This commit is contained in:
@@ -8,20 +8,28 @@
|
|||||||
{% set AGENT_STATUS = salt['service.available']('elastic-agent') %}
|
{% set AGENT_STATUS = salt['service.available']('elastic-agent') %}
|
||||||
{% if not AGENT_STATUS %}
|
{% if not AGENT_STATUS %}
|
||||||
|
|
||||||
|
pull_agent_installer:
|
||||||
|
file.managed:
|
||||||
|
- name: /opt/so/so-elastic-agent_linux_amd64
|
||||||
|
- source: salt://elasticfleet/files/so_agent-installers/so-elastic-agent_linux_amd64
|
||||||
|
- mode: 755
|
||||||
|
- makedirs: True
|
||||||
|
|
||||||
{% if grains.role not in ['so-heavynode'] %}
|
{% if grains.role not in ['so-heavynode'] %}
|
||||||
run_installer:
|
run_installer:
|
||||||
cmd.script:
|
cmd.run:
|
||||||
- name: salt://elasticfleet/files/so_agent-installers/so-elastic-agent_linux_amd64
|
- name: ./so-elastic-agent_linux_amd64 -token={{ GRIDNODETOKENGENERAL }}
|
||||||
- cwd: /opt/so
|
- cwd: /opt/so
|
||||||
- args: -token={{ GRIDNODETOKENGENERAL }}
|
|
||||||
- retry: True
|
- retry: True
|
||||||
{% else %}
|
{% else %}
|
||||||
run_installer:
|
run_installer:
|
||||||
cmd.script:
|
cmd.run:
|
||||||
- name: salt://elasticfleet/files/so_agent-installers/so-elastic-agent_linux_amd64
|
- name: ./so-elastic-agent_linux_amd64 -token={{ GRIDNODETOKENHEAVY }}
|
||||||
- cwd: /opt/so
|
- cwd: /opt/so
|
||||||
- args: -token={{ GRIDNODETOKENHEAVY }}
|
|
||||||
- retry: True
|
- retry: True
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
cleanup_agent_installer:
|
||||||
|
file.absent:
|
||||||
|
- name: /opt/so/so-elastic-agent_linux_amd64
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user