Add pkgbase_diff script.
This commit is contained in:
parent
fb679924bc
commit
63a966947b
8
ansible/roles/package_manager/files/pkgbase_diff.bash
Normal file
8
ansible/roles/package_manager/files/pkgbase_diff.bash
Normal file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Show the diff to have local pkgbase become matching to the remote pkgbase
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
diff --color=always <(doas pkg info --glob 'FreeBSD-*' | sed 's/-[0-9]*.snap[0-9]*//g') <(doas pkg search -q --glob 'FreeBSD-*' | sed 's/-[0-9]*.snap[0-9]*//g')
|
@ -75,6 +75,18 @@
|
||||
mode: 0644
|
||||
loop:
|
||||
- { src: pkgbase.conf.j2, dest: /usr/local/etc/pkg/repos/pkgbase.conf }
|
||||
|
||||
# - name: Replace all packages with packages from new repo
|
||||
# command: pkg upgrade -f -y
|
||||
# when: changed_config.changed
|
||||
|
||||
- name: Install scripts
|
||||
copy:
|
||||
src: "files/{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: wheel
|
||||
loop:
|
||||
- src: pkgbase_diff.bash
|
||||
dest: /usr/local/bin/pkgbase_diff
|
||||
|
Loading…
Reference in New Issue
Block a user