Le playbook peut être lancé en local avec ./deploy.sh local

This commit is contained in:
southerntofu 2020-04-11 23:00:17 +00:00
parent 83082057f9
commit f951ce7597
4 changed files with 35 additions and 3 deletions

23
.gitignore vendored Normal file
View File

@ -0,0 +1,23 @@
# ---> Vim
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
Sessionx.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
# File created by runing the playbook locally
site.retry

View File

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

1
host_vars/127.0.0.1.yml Symbolic link
View File

@ -0,0 +1 @@
fr.yml

View File

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