summaryrefslogtreecommitdiff
path: root/script_local
diff options
context:
space:
mode:
Diffstat (limited to 'script_local')
-rwxr-xr-xscript_local13
1 files changed, 13 insertions, 0 deletions
diff --git a/script_local b/script_local
new file mode 100755
index 0000000..cfe5d09
--- /dev/null
+++ b/script_local
@@ -0,0 +1,13 @@
+#!/bin/bash
+ssh-keygen -f ~/.ssh/known_hosts -R $1
+ssh-keyscan -H $1 >> ~/.ssh/known_hosts
+# nécessite droits sudo sans mot de passe pour ip à l'utilisateur local
+sudo ip route del 10.0.3.0/24
+sudo ip route add 10.0.3.0/24 via $1
+ansible-playbook -u ansible --become -i "$1," playbooks/lxc.yml
+# remplacé par les local_actions dans le playbook lxc.yml
+#ssh-keyscan -H -f playbooks/hosts >> ~/.ssh/known_hosts
+ansible-playbook -u root -i playbooks/hosts playbooks/lamp.yml
+
+
+