mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2026-03-13 05:42:46 +01:00
build
This commit is contained in:
20
roles/cloud_init/tasks/main.yml
Normal file
20
roles/cloud_init/tasks/main.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: Ensure required packages are installed
|
||||
ansible.builtin.dnf:
|
||||
name: "{{ cloud_init_packages }}"
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Ensure cloud-init service is enabled
|
||||
ansible.builtin.systemd:
|
||||
name: "{{ cloud_init_service }}"
|
||||
enabled: true
|
||||
|
||||
- name: Deploy custom cloud-init configuration
|
||||
ansible.builtin.template:
|
||||
src: 99-custom.cfg.j2
|
||||
dest: /etc/cloud/cloud.cfg.d/99-custom.cfg
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
notify: Restart cloud-init
|
||||
Reference in New Issue
Block a user