diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96d6c00 --- /dev/null +++ b/.gitignore @@ -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 diff --git a/deploy.sh b/deploy.sh index 4e4c25d..a9009d5 100755 --- a/deploy.sh +++ b/deploy.sh @@ -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 diff --git a/host_vars/127.0.0.1.yml b/host_vars/127.0.0.1.yml new file mode 120000 index 0000000..1a04feb --- /dev/null +++ b/host_vars/127.0.0.1.yml @@ -0,0 +1 @@ +fr.yml \ No newline at end of file diff --git a/site.yml b/site.yml index d914d11..dc9b5e4 100644 --- a/site.yml +++ b/site.yml @@ -1,9 +1,9 @@ - name: Setup common utilities - hosts: fr + hosts: all roles: - common - name: Setup web server - hosts: fr + hosts: all roles: - webserver