]> git.phdru.name Git - ansible.git/commitdiff
Feat(run-playbook): Run any playbook from the command line
authorOleg Broytman <phd@phdru.name>
Fri, 12 Jul 2019 22:23:33 +0000 (01:23 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 16 Jul 2019 18:28:41 +0000 (21:28 +0300)
Rename debian-update-all-apt.sh -> run-playbook.

playbooks/debian-update-all-apt.sh [deleted file]
playbooks/run-playbook [new file with mode: 0755]

diff --git a/playbooks/debian-update-all-apt.sh b/playbooks/debian-update-all-apt.sh
deleted file mode 100755 (executable)
index 347012f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /bin/sh
-exec ansible-playbook -v debian-update-all-apt.yml | ${PAGER:-more}
diff --git a/playbooks/run-playbook b/playbooks/run-playbook
new file mode 100755 (executable)
index 0000000..4fb56e1
--- /dev/null
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+if [ -z "$1" ]; then
+   echo "Usage: $0 playbook.yml" >&2
+   exit 1
+fi
+
+ansible-playbook -v "$1" | ${PAGER:-more}