-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathall.sh
executable file
·25 lines (25 loc) · 1.19 KB
/
all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
echo "Static inventory example"
ansible-inventory -i 00_static/hosts --list --export
./sqlite_setup.sh
export ANSIBLE_NOCOWS=1
echo "GCP Compute inventory plugin scenario"
echo " will not print output (too big), but count lines in output"
ansible-inventory -i 01_gcp/private.gcp_compute.yml --list --export | wc -l
echo "Azure RM inventory plugin scenario"
./02_azure/set_env.sh
ansible-playbook -i 02_azure/azure_rm.yaml debug.yml
echo "SQlite3 custom inventory plugin scenario"
ansible-inventory -i 03_sqlite/sqlite.yml --playbook-dir=03_sqlite --list --export
echo "SQLite3 inventory script scenario"
# this does not need --playbook-dir, because no plugin
SQLITE_DATABASE_PATH=hosts.db SQLITE_DATABASE_TABLE=hosts ansible-inventory -i 04_as_script/sqlite_script.py --list --export
echo "Basic example"
# got fancy with the bash script here
./05_basic/run.sh
echo "AWS options example"
echo " will not print output (too big), but count lines in output"
ansible-inventory -i 07_aws_options/private.aws_ec2.yml --list --export | wc -l
echo "AWS keyed example"
echo " will not print output (too big), but count lines in output"
ansible-inventory -i 08_keyed/private.aws_ec2.yml --list --export | wc -l