Files
Phraseanet/resources/ansible/roles/vagrant_local/tasks/main.yml
2019-04-17 17:47:45 +02:00

14 lines
540 B
YAML

---
- name: Set the hostname in /etc/hostname
shell: echo {{ vagrant_local.vm.hostname }} > /etc/hostname
when: vagrant_local.vm.hostname is defined
- name: Set the hostname
shell: hostname {{ vagrant_local.vm.hostname }}
when: vagrant_local.vm.hostname is defined
- name: Update /etc/hosts
lineinfile: dest=/etc/hosts regexp='^127\.0\.0\.1' line='127.0.0.1 localhost {{ vagrant_local.vm.hostname|default('') }}' owner=root group=root mode=0644
when: vagrant_local.vm.hostname is defined
- include: docker-hosts-container.yml