From 13deb987c9b0e009162320845a4036a78c6eda35 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 4 Aug 2014 13:55:38 +0900 Subject: [PATCH] ansible: run.sh -> local.sh --- ansible/{hosts => local.hosts} | 2 +- ansible/{run.sh => local.sh} | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) rename ansible/{hosts => local.hosts} (62%) rename ansible/{run.sh => local.sh} (56%) diff --git a/ansible/hosts b/ansible/local.hosts similarity index 62% rename from ansible/hosts rename to ansible/local.hosts index a61818c..3845431 100644 --- a/ansible/hosts +++ b/ansible/local.hosts @@ -1 +1 @@ -localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python2 package_manager=pacman +localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python2 diff --git a/ansible/run.sh b/ansible/local.sh similarity index 56% rename from ansible/run.sh rename to ansible/local.sh index 342cd69..63f01a5 100755 --- a/ansible/run.sh +++ b/ansible/local.sh @@ -8,4 +8,10 @@ then exit 1 fi -ansible-playbook -i hosts --ask-sudo-pass "$@" +if test $# -eq 0 +then + echo "usage: $0 [...]" + exit 1 +fi + +ansible-playbook -i local.hosts --ask-sudo-pass "$@"