Skip to content

Commit

Permalink
feat: add falcoctl configuration, driver, artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
juju4 committed Aug 10, 2024
1 parent 2eb9c6b commit 60af989
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ falco_grpc_unix_enabled: false
falco_reporting: true
falco_reporting_template: falco_report.sh
falco_reporting_dest: /var/tmp

falcoctl_artifacts_follow: []
# - github-rules
# - k8saudit-rules
25 changes: 25 additions & 0 deletions tasks/falcoctl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---

- name: Falcoctl | Get current index
ansible.builtin.command:
cmd: falcoctl index list
changed_when: false
register: falcoctl_index

- name: Falcoctl | Configure index
ansible.builtin.command: # noqa no-changed-when
cmd: falcoctl index add falcosecurity https://falcosecurity.github.io/falcoctl/index.yaml
when:
- "'falcosecurity' not in falcoctl_index.stdout"

- name: Falcoctl | Configure driver
ansible.builtin.command: # noqa no-changed-when
cmd: "{{ item }}"
loop:
- falcoctl driver config --type ebpf
- falcoctl driver install # Will build/fech driver if kernel is supported

- name: Falcoctl | Configure follow artifacts
ansible.builtin.command: # noqa no-changed-when
cmd: "falcoctl artifact follow {{ item }}"
loop: "{{ falcoctl_artifacts_follow }}"
3 changes: 3 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
- name: Import falco (distrib package)
ansible.builtin.import_tasks: falco.yml
when: not falco_k8s_helm | bool

- name: Import falcoctl
ansible.builtin.import_tasks: falcoctl.yml

0 comments on commit 60af989

Please sign in to comment.