tmp-iac/centos/Makefile

38 lines
769 B
Makefile
Raw Normal View History

2023-07-03 17:27:57 +05:30
default:
echo yes | terraform destroy
terraform plan --out=plan
terraform apply plan
inventory:
terraform plan --out=plan
terraform apply plan
configure:
ansible-playbook -i ./ansible/inventory/hosts.ini -f 10 ./ansible/playbook.yml
check:
ansible-playbook --check ./ansible/playbook.yml
lint:
terraform fmt
ansible-lint --write ./ansible/playbook.yml
ansible-lint --write ./ansible/shutdown.yml
. ./venv/bin/activate && black tests/
on:
./scripts/on.sh
virsh list
shutdown:
ansible-playbook -i ./ansible/inventory/hosts.ini -f 10 ./ansible/shutdown.yml
# ./ansible/playbook.yml
test:
. ./venv/bin/activate && \
cd tests/ && \
py.test --hosts='ansible://all' \
-n 10 \
--verbose \
--ansible-inventory='../ansible/inventory/hosts.ini'