Skip to content

Commit 86cd5ca

Browse files
author
gregmalkov
committed
Ensuring 2.x is installed when no version given
1 parent d423621 commit 86cd5ca

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tasks/apt_install.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
state: present
2222
update_cache: yes
2323

24+
- name: Ensure 2.x is installed when no version specified
25+
set_fact:
26+
threatstack_pkg: threatstack-agent=2*
27+
when:
28+
- not threatstack_v1
29+
- threatstack_pkg == 'threatstack-agent'
30+
2431
- name: Ensure Threat Stack is installed.
2532
apt:
2633
name: "{{ threatstack_pkg }}"

tasks/yum_install.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
key: https://app.threatstack.com/RPM-GPG-KEY-THREATSTACK
1414
validate_certs: no
1515

16+
- name: Ensure 2.x is installed when no version specified
17+
set_fact:
18+
threatstack_pkg: threatstack-agent-2*
19+
when:
20+
- not threatstack_v1
21+
- threatstack_pkg == 'threatstack-agent'
22+
1623
- name: Ensure Agent is installed.
1724
yum:
1825
name: "{{ threatstack_pkg }}"

0 commit comments

Comments
 (0)