Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
TL;DR:
pip install ansible-parallel
ansible-parallel *.yml
Executes multiple ansible playbooks in parallel.
For my usage, running sequentially (using a site.yml
containing
multiple import_playbook
) takes 30mn, running in parallel takes
10mn.
ansible-parallel
runs like ansible-playbook
but accepts multiple
playbooks. All remaining options are passed to ansible-playbook
so
feel free to run ansible-parallel --check *.yml
for example.
It's easy to start:
$ ansible-parallel *.yml
When it runs, it display a live update of what's going on, one line per playbook:
web.yml: TASK [common : Configure Debian repositories] *****************************
gitlab.yml: TASK [common : Configure IP failover] *************************************
staging.yml: TASK [common : Configure Debian repositories] *****************************
dev.yml: Done.
And when it's done, it prints a full report like:
# Playbook playbook-webs.yml, ran in 123s
web1.meltygroup.com : ok=51 changed=0 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0
web2.meltygroup.com : ok=51 changed=0 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0
web3.meltygroup.com : ok=51 changed=0 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0
# Playbook playbook-staging.yml, ran in 138s
staging1.meltygroup.com : ok=64 changed=6 unreachable=0 failed=0 skipped=18 rescued=0 ignored=0
# Playbook playbook-gitlab.yml, ran in 179s
gitlab-runner1.meltygroup.com : ok=47 changed=0 unreachable=0 failed=0 skipped=13 rescued=0 ignored=0
gitlab-runner2.meltygroup.com : ok=47 changed=0 unreachable=0 failed=0 skipped=13 rescued=0 ignored=0
gitlab-runner3.meltygroup.com : ok=47 changed=0 unreachable=0 failed=0 skipped=13 rescued=0 ignored=0
gitlab.meltygroup.com : ok=51 changed=0 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0
# Playbook playbook-devs.yml, ran in 213s
dev1.meltygroup.com : ok=121 changed=0 unreachable=0 failed=0 skipped=22 rescued=0 ignored=0
dev2.meltygroup.com : ok=121 changed=0 unreachable=0 failed=0 skipped=22 rescued=0 ignored=0
ansible-parallel is only good if you want to keep the push behavior of Ansible, but if you're here you may have a lot of playbooks, and switching to ansible-pull with a proper reporting system like ARA
A quick and dirty way of doing it in 3 lines of bash:
ls -1 *.yml | xargs -n1 -P16 sh -c 'ansible-playbook "$$0" > "$$0.log"' ||:
grep -B1 "^\(changed\|fatal\|failed\):" *.log
echo *.yml.log | xargs -n1 sed -n -e '/^PLAY RECAP/,$$p'
FAQs
Run ansible playbooks in parallel.
We found that ansible-parallel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.