| 
14 | 14 | 
 
  | 
15 | 15 | ---  | 
16 | 16 | 
 
  | 
17 |  | -- name: Add Falco package signing key  | 
18 |  | -  ansible.builtin.apt_key:  | 
19 |  | -    url: https://falco.org/repo/falcosecurity-packages.asc  | 
20 |  | -    state: present  | 
 | 17 | +- name: Install Falco on Debian based systems  | 
21 | 18 |   when: ansible_os_family == "Debian"  | 
 | 19 | +  block:  | 
 | 20 | +    - name: Add Falco package signing key  | 
 | 21 | +      ansible.builtin.apt_key:  | 
 | 22 | +        url: https://falco.org/repo/falcosecurity-packages.asc  | 
 | 23 | +        state: present  | 
22 | 24 | 
 
  | 
23 |  | -- name: Add Falco apt repo  | 
24 |  | -  ansible.builtin.apt_repository:  | 
25 |  | -    repo: deb https://download.falco.org/packages/deb stable main  | 
26 |  | -    state: present  | 
27 |  | -    filename: falcosecurity  | 
28 |  | -  when: ansible_os_family == "Debian"  | 
 | 25 | +    - name: Add Falco apt repo  | 
 | 26 | +      ansible.builtin.apt_repository:  | 
 | 27 | +        repo: deb https://download.falco.org/packages/deb stable main  | 
 | 28 | +        state: present  | 
 | 29 | +        filename: falcosecurity  | 
29 | 30 | 
 
  | 
30 |  | -- name: Install Falco requirements  | 
31 |  | -  ansible.builtin.apt:  | 
32 |  | -    pkg:  | 
33 |  | -      - dkms  | 
34 |  | -      - make  | 
35 |  | -      - "linux-headers-{{ ansible_kernel }}"  | 
36 |  | -      - clang  | 
37 |  | -      - llvm  | 
38 |  | -    update_cache: true  | 
39 |  | -    state: present  | 
40 |  | -  ignore_errors: true  | 
41 |  | -  register: pkg_result  | 
42 |  | -  until: pkg_result is success  | 
43 |  | -  when: ansible_os_family == "Debian"  | 
 | 31 | +    - name: Install Falco requirements  | 
 | 32 | +      ansible.builtin.apt:  | 
 | 33 | +        pkg:  | 
 | 34 | +          - dkms  | 
 | 35 | +          - make  | 
 | 36 | +          - "linux-headers-{{ ansible_kernel }}"  | 
 | 37 | +          - clang  | 
 | 38 | +          - llvm  | 
 | 39 | +        update_cache: true  | 
 | 40 | +        state: present  | 
 | 41 | +      ignore_errors: true  | 
 | 42 | +      register: pkg_result  | 
 | 43 | +      until: pkg_result is success  | 
 | 44 | + | 
 | 45 | +- name: Install Falco on RedHat based systems  | 
 | 46 | +  when: ansible_os_family == "RedHat"  | 
 | 47 | +  block:  | 
 | 48 | +    - name: Add Falco YUM repo  | 
 | 49 | +      ansible.builtin.yum_repository:  | 
 | 50 | +        name: Falco repository  | 
 | 51 | +        description: Falco YUM repo  | 
 | 52 | +        file: falcosecurity  | 
 | 53 | +        baseurl: https://falco.org/repo/falcosecurity-rpm.repo  | 
 | 54 | +        gpgcheck: true  | 
 | 55 | +        enabled: true  | 
 | 56 | +        gpgkey: https://falco.org/repo/falcosecurity-packages.asc  | 
 | 57 | + | 
 | 58 | +    - name: Install Falco requirements  | 
 | 59 | +      ansible.builtin.dnf:  | 
 | 60 | +        pkg:  | 
 | 61 | +          - dkms  | 
 | 62 | +          - make  | 
 | 63 | +          - "kernel-devel-{{ ansible_kernel }}"  | 
 | 64 | +          - clang  | 
 | 65 | +          - llvm  | 
 | 66 | +          - dialog  | 
 | 67 | +        state: present  | 
 | 68 | +      ignore_errors: true  | 
 | 69 | +      register: pkg_result  | 
 | 70 | +      until: pkg_result is success  | 
44 | 71 | 
 
  | 
45 | 72 | - name: Install Falco  | 
46 |  | -  ansible.builtin.apt:  | 
 | 73 | +  ansible.builtin.package:  | 
47 | 74 |     name: falco  | 
48 |  | -    update_cache: true  | 
49 | 75 |     state: present  | 
50 |  | -  when: ansible_os_family == "Debian"  | 
 | 76 | +  when: ansible_os_family == "Debian" or ansible_os_family == "RedHat"  | 
51 | 77 | 
 
  | 
52 | 78 | - name: Enable Falco Modern eBPF  | 
53 | 79 |   ansible.builtin.service:  | 
54 | 80 |     name: falco-modern-bpf  | 
55 | 81 |     state: started  | 
56 | 82 |     enabled: true  | 
57 |  | -  when: ansible_os_family == "Debian"  | 
 | 83 | +  when: ansible_os_family == "Debian" or ansible_os_family == "RedHat"  | 
0 commit comments