Rename `distro` to `install_distro` and `distcodename` to `install_codename`.
- set_fact:
tmpdir: "{{ tmpdir.stdout }}"
- initramfs: "{{ preseed_path | mandatory }}/{{ hostname }}-{{ distro }}-{{ distcodename }}.initrd.gz"
+ initramfs: "{{ preseed_path | mandatory }}/{{ hostname }}-{{ install_distro }}-{{ install_codename }}.initrd.gz"
- name: Copy initramfs into position
copy:
remote_src: yes
- src: "{{ debian_installer_path | mandatory }}/{{ distro }}-{{ distcodename }}/{{ hostvars[hostname].install_cooked.arch | default('amd64') }}/initrd.gz"
+ src: "{{ debian_installer_path | mandatory }}/{{ install_distro }}-{{ install_codename }}/{{ hostvars[hostname].install_cooked.arch | default('amd64') }}/initrd.gz"
dest: "{{ initramfs }}"
- name: Generate preseed file
template:
- src: "preseed_{{ distro }}-{{ distcodename }}.cfg.j2"
+ src: "preseed_{{ install_distro }}-{{ install_codename }}.cfg.j2"
dest: "{{ tmpdir }}/preseed.cfg"
- name: Generate authorized_keys file
dependencies:
- role: debian-installer
distros:
- - distro: "{{ distro }}"
- codename: "{{ distcodename }}"
+ - distro: "{{ install_distro }}"
+ codename: "{{ install_codename }}"
arch: [ "{{ install.arch }}" ]
- role: preseed
<os>
<type arch='x86_64' machine='pc-0.12'>hvm</type>
{% if run_installer %}
- <kernel>{{ debian_installer_path }}/{{ distro }}-{{ distcodename }}/{{ hostvars[hostname].install_cooked.arch | default('amd64') }}/linux</kernel>
- <initrd>{{ preseed_path }}/{{ hostname }}-{{ distro }}-{{ distcodename }}.initrd.gz</initrd>
+ <kernel>{{ debian_installer_path }}/{{ install_distro }}-{{ install_codename }}/{{ hostvars[hostname].install_cooked.arch | default('amd64') }}/linux</kernel>
+ <initrd>{{ preseed_path }}/{{ hostname }}-{{ install_distro }}-{{ install_codename }}.initrd.gz</initrd>
<cmdline>console=ttyS0,115200n8</cmdline>
{% endif %}
<boot dev='hd'/>
echo ""
echo "######## running the install playbook ########"
-exec ansible-playbook -e "hostname=$name" -e "distro=$distro" -e "distcodename=$codename" $@ $(basename "$0" .sh).yml
+exec ansible-playbook -e "hostname=$name" -e "install_distro=$distro" -e "install_codename=$codename" $@ $(basename "$0" .sh).yml