Skip to content

Commit

Permalink
fix!: stop disable of ptrace protection
Browse files Browse the repository at this point in the history
Role disabled ptrace protection for the kernel per default, which we
don't want. This is only required for debugging purposes and should not
be touched in the scope of this role!

Refs: https://docs.bareos.org/Appendix/Debugging.html#traceback
  • Loading branch information
adf-patrickha committed Oct 29, 2024
1 parent fb8f585 commit 435f4b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ bareos_repository_release: current
bareos_repository_version: 23

# You can enable tracebacks for troubleshooting purposes.
bareos_repository_enable_tracebacks: no
bareos_repository_enable_tracebacks: false
28 changes: 11 additions & 17 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
- name: Import assert.yml
ansible.builtin.import_tasks:
file: assert.yml
run_once: yes
run_once: true
delegate_to: localhost

- name: Add repository (rpm)
ansible.builtin.yum_repository:
name: "{{ item.name }}"
description: "{{ item.description }}"
baseurl: "{{ item.baseurl }}"
gpgcheck: yes
gpgcheck: true
gpgkey: "{{ item.gpgkey }}"
username: "{{ item.username | default(omit) }}"
password: "{{ item.password | default(omit) }}"
no_log: yes
no_log: true
loop: "{{ bareos_repository_list }}"
loop_control:
label: "{{ item.name }}"
Expand All @@ -40,7 +40,7 @@
owner: root
group: root
mode: "0644"
no_log: yes
no_log: true

- name: Place credentials file (apt)
ansible.builtin.copy:
Expand All @@ -52,7 +52,7 @@
owner: root
group: root
mode: "0600"
no_log: yes
no_log: true
when:
- bareos_repository_type == "subscription"

Expand All @@ -61,8 +61,8 @@
repo: "{{ item.deb_repo }}"
state: present
filename: "{{ item.name }}"
update_cache: yes
no_log: yes
update_cache: true
no_log: true
loop: "{{ bareos_repository_list }}"
loop_control:
label: "{{ item.name }}"
Expand All @@ -80,7 +80,7 @@
owner: root
group: root
mode: "0644"
no_log: yes
no_log: true

- name: Import gpg key (zypper)
ansible.builtin.rpm_key:
Expand All @@ -95,7 +95,7 @@
owner: root
group: root
mode: "0600"
no_log: yes
no_log: true
when:
- bareos_repository_type == "subscription"

Expand All @@ -117,11 +117,11 @@
name: "{{ item.name }}"
description: "{{ item.description }}"
baseurl: "{{ item.baseurl }}"
gpgcheck: yes
gpgcheck: true
gpgkey: "{{ item.gpgkey }}"
username: "{{ item.username | default(omit) }}"
password: "{{ item.password | default(omit) }}"
no_log: yes
no_log: true
loop: "{{ bareos_repository_debug_list }}"
loop_control:
label: "{{ item.name }}"
Expand All @@ -142,9 +142,3 @@
- name: Install required packages
ansible.builtin.package:
name: "{{ bareos_repository_debug_required_packages }}"

- name: Disable ptrace_scope
ansible.posix.sysctl:
name: kernel.yama.ptrace_scope
value: "0"
sysctl_set: yes

0 comments on commit 435f4b3

Please sign in to comment.