Skip to content

Commit

Permalink
Only restore prelinked binaries if prelinked is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mab879 committed Jan 16, 2023
1 parent c84f529 commit 714076b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
# complexity = medium
# disruption = low

- name: Check If Prelinked Is Installed
ansible.builtin.stat:
path: /usr/sbin/prelink
get_checksum: no
register: prelink

- name: Restore Prelinked Binaries
ansible.builtin.shell:
cmd: prelink -ua
when: prelink.stat.exists

- name: Ensure prelink is removed
- name: Ensure prelink is Removed
ansible.builtin.package:
name: "prelink"
state: absent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# strategy = disable
# complexity = medium
# disruption = low

if [[ -f /usr/sbin/prelink ]];
then
prelink -ua
fi

{{{ bash_package_remove(package="prelink") }}}

0 comments on commit 714076b

Please sign in to comment.