Update roles

This commit is contained in:
2021-06-29 22:10:31 -04:00
parent dfe9dea2ca
commit caf10019e2
45 changed files with 156 additions and 739 deletions

View 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

View File

@@ -1,2 +1,2 @@
install_date: Wed May 5 16:14:08 2021
install_date: Wed Jun 30 01:12:52 2021
version: master

View 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

View File

@@ -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