Skip to content

Commit

Permalink
Added task to configure /etc/hosts with fqdn hostname.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjelvar-olsson committed Apr 17, 2015
1 parent 7154870 commit 975cb9f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions provisioning/roles/omero/tasks/main.yml
Expand Up @@ -152,3 +152,18 @@
args:
creates: /etc/httpd/conf.d/omero.conf
notify: restart apache

###################################################################
# Configure /etc/hosts file with FQDN hostname.
###################################################################

- name: update /etc/hosts with FQDN hostname
lineinfile: dest=/etc/hosts regexp="^({{ item }}\s*)(localhost.*)$" line="\1{{ ansible_fqdn }} \2"
backrefs=yes
owner=root
group=root
mode=0644
backup=true
with_items:
- '127\.0\.0\.1'
- '::1'

0 comments on commit 975cb9f

Please sign in to comment.