From d73f54e7e56f689fa3dc69e5a54f078c9680c337 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Wed, 3 Oct 2018 15:31:49 +0200 Subject: debian: add basic Debian role --- roles/debian/tasks/hostname.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/debian/tasks/hostname.yml (limited to 'roles/debian/tasks/hostname.yml') diff --git a/roles/debian/tasks/hostname.yml b/roles/debian/tasks/hostname.yml new file mode 100644 index 0000000..6709c03 --- /dev/null +++ b/roles/debian/tasks/hostname.yml @@ -0,0 +1,15 @@ +--- +- name: Set hostname + hostname: + name: '{{ hostname }}' + when: not chroot +- name: '- when in chroot' + copy: + dest: '/etc/hostname' + content: "{{ hostname }}\n" + owner: root + group: root + mode: 0644 + when: chroot + +# vim: set ts=2 sw=2 et: -- cgit v1.2.1