mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-02-02 12:49:00 +08:00
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.
8 lines
260 B
Bash
Executable File
8 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
|