ansible/scripts/ansible-playbook-check-diff
Frank Ch. Eigler 1225279614 ansible-playbook-check-diff: rewrite as find|xargs one-liner
Taking advantage of xargs's -P option to limit concurrency
while executing all the ansible-playbook --check jobs ensures
that batcave01 is not overstressed during these checks.
2022-09-14 18:18:40 +00:00

7 lines
260 B
Bash
Executable file

#! /bin/sh
rootpath="/srv/web/infra/ansible/playbooks"
parallel=8 # limit since ansible-playbook takes O(1GB) RAM each on batcave
find $rootpath/hosts $rootpath/groups -type f -name '*.yml' |
xargs -I'{}' -P $parallel ansible-playbook '{}' --check --diff