Added building Ubuntu 20.04 template

This commit is contained in:
2024-09-22 20:13:32 +03:00
parent 36aa9106ea
commit 09aa511791
35 changed files with 629 additions and 123 deletions

View File

@ -0,0 +1,40 @@
---
- name: Prepare scripts for custom VMs (First start)
block:
- name: Copy files to remote system Debian
copy:
src: files/first_start_debian.sh
dest: /root/first_start.sh
owner: root
group: root
mode: '0644'
- name: Edit /etc/rc.local
lineinfile:
path: /etc/rc.local
regexp: '^(exit 0.*)$'
line: |
chmod 755 /root/first_start.sh | sed 's/^chmod 755 \/root\/first_start.sh.*/\/root\/first_start.sh \&/' -i /etc/rc.local &
exit 0
when: ansible_distribution == "Debian"
- name: Prepare scripts for custom VMs (First start)
block:
- name: Copy files to remote system Ubuntu
copy:
src: files/first_start_ubuntu.sh
dest: /root/first_start.sh
owner: root
group: root
mode: '0644'
- name: Edit /etc/rc.local
lineinfile:
path: /etc/rc.local
regexp: '^(exit 0.*)$'
line: |
chmod 755 /root/first_start.sh | sed 's/^chmod 755 \/root\/first_start.sh.*/\/root\/first_start.sh \&/' -i /etc/rc.local &
exit 0
when: ansible_distribution == "Ubuntu"