library/roles/deb-set-hostname/tasks/main.yml: Add a new tag.

This commit is contained in:
Andrea Dell'Amico 2018-02-02 11:07:29 +01:00
parent 0a181fe411
commit 762b8de65f
1 changed files with 2 additions and 2 deletions

View File

@ -2,9 +2,9 @@
- name: Set the hostname
hostname: name={{ hostname }}
when: hostname is defined
tags: bootstrap
tags: [ 'bootstrap', 'set_hostname' ]
- name: Add the hostname to /etc/hosts
shell: grep -v {{ ansible_default_ipv4.address }} /etc/hosts > /etc/hosts.tmp ; echo "{{ ansible_default_ipv4.address }} {{ hostname }} {{ ansible_hostname }}" >> /etc/hosts.tmp ; /bin/mv /etc/hosts.tmp /etc/hosts
when: hostname is defined
tags: bootstrap
tags: [ 'bootstrap', 'set_hostname' ]