add grub ansible role
This commit is contained in:
15
tasks/configuration.yaml
Normal file
15
tasks/configuration.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
|
||||
- name: create the grub configuration
|
||||
template:
|
||||
src: etc/default/grub.j2
|
||||
dest: '{{ grub_cfg }}'
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
seuser: system_u
|
||||
serole: object_r
|
||||
setype: bootloader_etc_t
|
||||
selevel: s0
|
||||
notify:
|
||||
- 'grub update config'
|
||||
6
tasks/installation.yaml
Normal file
6
tasks/installation.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
|
||||
- name: install grub related packages
|
||||
package:
|
||||
name: '{{ grub_packages }}'
|
||||
state: present
|
||||
20
tasks/main.yaml
Normal file
20
tasks/main.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
# tasks file for ansible-role-grub
|
||||
|
||||
- name: load variables based on distribution type
|
||||
include_vars: '{{ item }}'
|
||||
with_first_found:
|
||||
- '{{ ansible_distribution }}_{{ ansible_distribution_major_version }}.yaml'
|
||||
- '{{ ansible_os_family }}.yaml'
|
||||
tags:
|
||||
- 'grub_vars'
|
||||
|
||||
- name: import installation tasks
|
||||
import_tasks: installation.yaml
|
||||
tags:
|
||||
- 'grub_install'
|
||||
|
||||
- name: import configuration tasks
|
||||
import_tasks: configuration.yaml
|
||||
tags:
|
||||
- 'grub_configuration'
|
||||
Reference in New Issue
Block a user