diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-12-07 15:41:02 +0000 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-12-07 20:24:51 +0000 |
commit | 9bd2c8c17a22c84da9a6ba6407c5b928d77fb469 (patch) | |
tree | e382576853ac2ebfeffcf3eda6e45f6ec9618656 /roles/vmm/tasks/autoinstall-configuration.yml | |
parent | 12cf22b1a8d9ad23809ad8048119a6920cbb9675 (diff) | |
download | rules-9bd2c8c17a22c84da9a6ba6407c5b928d77fb469.tar.gz |
roles/vmm: Serve autoinstall configurations via httpd
Diffstat (limited to 'roles/vmm/tasks/autoinstall-configuration.yml')
-rw-r--r-- | roles/vmm/tasks/autoinstall-configuration.yml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/roles/vmm/tasks/autoinstall-configuration.yml b/roles/vmm/tasks/autoinstall-configuration.yml new file mode 100644 index 0000000..e05b11c --- /dev/null +++ b/roles/vmm/tasks/autoinstall-configuration.yml @@ -0,0 +1,27 @@ +- name: include httpd role variables + include_vars: "{{ inventory_dir }}/roles/httpd/defaults/main.yml" + +- name: create autoinstall directory + file: + path: /var/www/htdocs/autoinstall + owner: www + group: www + mode: 0700 + state: directory + +- name: generate autoinstall files + template: + src: autoinstall.conf.j2 + dest: "/var/www/htdocs/autoinstall/{{ item.lladdr }}-install.conf" + owner: www + group: www + mode: 0640 + loop: "{{ vmm_vms }}" + +- name: generate httpd configuration + template: + src: httpd.conf.j2 + dest: "{{ httpd_configuration_dir }}/autoinstall.conf" + owner: 0 + group: 0 + mode: 0640 |