aboutsummaryrefslogtreecommitdiffstats
path: root/roles/fedora/tasks/hostname.yml
blob: 5299270b9575402d774a537f4eb281e94f3ba235 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
---
- name: Set hostname
  hostname:
    name: '{{ hostname }}'
  when: "'container' not in ansible_env"
- name: '- when in nspawn'
  copy:
    dest: /etc/hostname
    content: "{{ hostname }}\n"
  when: "'container' in ansible_env"

# vim: set ts=2 sw=2 et: