Update roles
This commit is contained in:
12
roles/oatakan.rhel_template_build/files/growpart.service
Normal file
12
roles/oatakan.rhel_template_build/files/growpart.service
Normal file
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Extend root partition and resize file system
|
||||
After=local-fs.target
|
||||
Wants=local-fs.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/grow_part.sh
|
||||
Type=oneshot
|
||||
ExecStop=/bin/sh -c "/usr/bin/systemctl disable growpart.service || exit 0"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,2 +1,2 @@
|
||||
install_date: Wed May 5 16:14:08 2021
|
||||
install_date: Wed Jun 30 01:12:52 2021
|
||||
version: master
|
||||
|
||||
25
roles/oatakan.rhel_template_build/tasks/grow_part.yml
Normal file
25
roles/oatakan.rhel_template_build/tasks/grow_part.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
|
||||
- name: ensure growpart packages are installed
|
||||
package:
|
||||
name:
|
||||
- cloud-utils-growpart
|
||||
- gdisk
|
||||
|
||||
- name: create growpart cloud-init script to grow partition on boot
|
||||
template:
|
||||
src: grow_part.sh.j2
|
||||
dest: /usr/local/bin/grow_part.sh
|
||||
mode: u=rwx,g=rx,o=rx
|
||||
|
||||
- name: copy growpart service
|
||||
copy:
|
||||
src: growpart.service
|
||||
dest: /etc/systemd/system/growpart.service
|
||||
|
||||
- name: reload service
|
||||
systemd:
|
||||
name: growpart
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: stopped
|
||||
@@ -103,6 +103,9 @@
|
||||
- include_tasks: cloud-init.yml
|
||||
when: target_ovirt | bool
|
||||
|
||||
- include_tasks: grow_part.yml
|
||||
when: not (target_ovirt | bool)
|
||||
|
||||
- include_tasks: ovirt.yml
|
||||
when: target_ovirt | bool
|
||||
|
||||
|
||||
Reference in New Issue
Block a user