]> git.phdru.name Git - ansible.git/blobdiff - playbooks/redhat/init-system.sh
Feat(RedHat): Add RedHat and redhatoids playbooks and roles
[ansible.git] / playbooks / redhat / init-system.sh
diff --git a/playbooks/redhat/init-system.sh b/playbooks/redhat/init-system.sh
new file mode 100755 (executable)
index 0000000..085eb3a
--- /dev/null
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+if [ -z "$1" ]; then
+   echo "Usage: $0 host [...params...]" >&2
+   exit 1
+fi
+
+host="$1"
+shift
+
+cd "`dirname \"$0\"`" &&
+ANSIBLE_ROLES_PATH=roles:../roles &&
+export ANSIBLE_ROLES_PATH &&
+
+# Passwordless access isn't configured yet; use `ssh` connection sharing.
+# `sudo` isn't configured yet too; ask for phd password.
+ansible-playbook init-system.yml "$@" -e hosts="$host" -K &&
+exec ansible-playbook init-system2.yml "$@" -e hosts="$host"