Simplifier la recette du playbook

This commit is contained in:
southerntofu 2020-04-15 13:28:27 +00:00
parent 9a0e25c961
commit c7c790e608
4 changed files with 9 additions and 13 deletions

2
.gitignore vendored
View File

@ -20,4 +20,4 @@ tags
[._]*.un~
# File created by runing the playbook locally
site.retry
*.retry

View File

@ -1,10 +1,10 @@
#!/bin/bash
if [[ $1 = "test" ]]; then
ansible-playbook --check -i hosts site.yml
ansible-playbook --check -i hosts recette.yml
elif [[ $1 = "local" ]]; then
ansible-playbook --connection=local --inventory 127.0.0.1, --limit 127.0.0.1 \
site.yml -i hosts
recette.yml -i hosts
else
ansible-playbook -i hosts site.yml
ansible-playbook -i hosts recette.yml
fi

5
recette.yml Normal file
View File

@ -0,0 +1,5 @@
- name: Installer le serveur
hosts: all
roles:
- common
- webserver

View File

@ -1,9 +0,0 @@
- name: Setup common utilities
hosts: all
roles:
- common
- name: Setup web server
hosts: all
roles:
- webserver