2021-06-09 09:04:05 +00:00
|
|
|
- name: Create destination folder
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /opt/firstboot
|
|
|
|
state: directory
|
2022-06-24 21:44:10 +00:00
|
|
|
|
2021-06-09 08:39:00 +00:00
|
|
|
- name: Create firstboot script file
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: firstboot.j2
|
|
|
|
dest: /opt/firstboot/firstboot.sh
|
2021-06-08 19:56:06 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: o+x
|
2022-06-24 21:44:10 +00:00
|
|
|
|
2021-06-08 19:56:06 +00:00
|
|
|
- name: Create @reboot crontab job
|
|
|
|
ansible.builtin.cron:
|
2021-06-09 20:49:14 +00:00
|
|
|
name: firstboot
|
2021-06-08 19:56:06 +00:00
|
|
|
special_time: reboot
|
2022-06-29 07:58:10 +00:00
|
|
|
job: "/opt/firstboot/firstboot.sh >/dev/tty1 2>&1"
|
2022-06-24 21:44:10 +00:00
|
|
|
|
2023-01-18 14:09:32 +00:00
|
|
|
- name: Copy payload folder (common)
|
2021-06-09 08:39:00 +00:00
|
|
|
ansible.builtin.copy:
|
2023-01-18 14:09:32 +00:00
|
|
|
src: ansible_payload/common/
|
|
|
|
dest: /opt/firstboot/ansible/
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: '0644'
|
|
|
|
|
|
|
|
- name: Copy payload folder (per appliancetype)
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: ansible_payload/{{ appliancetype }}
|
2021-06-09 08:39:00 +00:00
|
|
|
dest: /opt/firstboot/ansible/
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: '0644'
|