Skip to content

Commit

Permalink
Used better variables to loop through RedHat and debian installs (#5413)
Browse files Browse the repository at this point in the history
Co-authored-by: Vickie Karasic <[email protected]>
Co-authored-by: Francis Kayiwa <[email protected]>
  • Loading branch information
3 people authored Oct 3, 2024
1 parent 40e526e commit 6c79539
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions playbooks/utils/security_theater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
state: present
key: https://software.bigfix.com/download/bes/95/RPM-GPG-KEY-BigFix-9-V2
when:
- ansible_pkg_mgr == 'dnf'
- ansible_os_family == "RedHat"

- name: Create bigfix directory
ansible.builtin.file:
Expand Down Expand Up @@ -53,7 +53,7 @@
mode: "0644"
when:
- "ansible_facts.services['besclient.service'] is not defined"
- ansible_pkg_mgr == 'apt'
- ansible_os_family == "Debian"

- name: Download the bigfix deb file (RedHat)
ansible.builtin.get_url:
Expand All @@ -64,7 +64,7 @@
mode: "0644"
when:
- "ansible_facts.services['besclient.service'] is not defined"
- ansible_pkg_mgr == 'dnf'
- ansible_os_family == "RedHat"

- name: Download the Falcon sensor deb file (Ubuntu)
ansible.builtin.get_url:
Expand All @@ -75,7 +75,7 @@
mode: "0644"
when:
- "'falcon-sensor' not in ansible_facts.packages"
- ansible_pkg_mgr == 'apt'
- ansible_os_family == "Debian"

- name: Download the Falcon sensor rpm file (RedHat)
ansible.builtin.get_url:
Expand All @@ -86,22 +86,22 @@
mode: "0644"
when:
- "'falcon-sensor' not in ansible_facts.packages"
- ansible_pkg_mgr == 'dnf'
- ansible_os_family == "RedHat"

- name: install BESClient agent (Ubuntu)
ansible.builtin.apt:
deb: "/tmp/BESAgent-10.0.7.52-debian6.amd64.deb"
when:
- "ansible_facts.services['besclient.service'] is not defined"
- ansible_pkg_mgr == 'apt'
- ansible_os_family == "Debian"

- name: install BESClient agent (RedHat)
ansible.builtin.dnf:
name: "/tmp/BESAgent-10.0.7.52-rhel6.x86_64.rpm"
state: present
when:
- "ansible_facts.services['besclient.service'] is not defined"
- ansible_pkg_mgr == 'dnf'
- ansible_os_family == "RedHat"

- name: Launch the BigFix client
ansible.builtin.command: /etc/init.d/besclient start
Expand All @@ -112,15 +112,15 @@
deb: "/tmp/falcon-sensor_7.05.0-16004_amd64.deb"
when:
- "'falcon-sensor' not in ansible_facts.packages"
- ansible_pkg_mgr == 'apt'
- ansible_os_family == "Debian"

- name: install crowdstrike falcon sensor agent (RedHat)
ansible.builtin.dnf:
name: "/tmp/falcon-sensor_7.05.0-16004_el9.x86_64.rpm"
state: present
when:
- "'falcon-sensor' not in ansible_facts.packages"
- ansible_pkg_mgr == 'dnf'
- ansible_os_family == "RedHat"

- name: launch crowdstrike falcon agent
command: /opt/CrowdStrike/falconctl -s --cid={{ princeton_cid }}
Expand Down

0 comments on commit 6c79539

Please sign in to comment.