summaryrefslogtreecommitdiffstats
path: root/tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml')
-rw-r--r--tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml b/tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml
new file mode 100644
index 0000000..84dd252
--- /dev/null
+++ b/tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml
@@ -0,0 +1,6 @@
+---
+- name: remove IPv6 address for localhost
+ shell: sed -i '/::1/s/localhost //' /etc/hosts
+
+- name: add IPv4 address for localhost
+ shell: sed -i '/127.0.0.1/s/$/ localhost/' /etc/hosts