generated from nicolabelluti/template-ansible
Added users role to manage the playbook as root and remove admin privileges from deck
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
- name: Add the bc250-cachyos pacman repository
|
||||
become: true
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/pacman.conf
|
||||
marker: "# {mark} - Ansible managed"
|
||||
@@ -11,14 +10,12 @@
|
||||
register: pacman_repo
|
||||
|
||||
- name: Perform a full system upgrade
|
||||
become: true
|
||||
community.general.pacman:
|
||||
update_cache: "{{ pacman_repo.changed }}"
|
||||
upgrade: true
|
||||
register: sys_upgrade
|
||||
|
||||
- name: Give the BC-250 kernel priority in BOOT_ORDER
|
||||
become: true
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/default/limine
|
||||
regexp: '^BOOT_ORDER='
|
||||
@@ -26,7 +23,6 @@
|
||||
register: boot_order
|
||||
|
||||
- name: Install the BC-250 kernel and the fallback
|
||||
become: true
|
||||
community.general.pacman:
|
||||
name:
|
||||
- linux-cachyos-bore-bc250
|
||||
@@ -37,13 +33,11 @@
|
||||
register: kernel_pkg
|
||||
|
||||
- name: Regenerate Limine entries when only BOOT_ORDER changed
|
||||
become: true
|
||||
ansible.builtin.command: limine-mkinitcpio
|
||||
when: boot_order.changed and not kernel_pkg.changed
|
||||
changed_when: true
|
||||
|
||||
- name: Preselect the BC-250 kernel for the next boot
|
||||
become: true
|
||||
ansible.builtin.shell:
|
||||
executable: /bin/bash
|
||||
cmd: |
|
||||
@@ -57,7 +51,6 @@
|
||||
failed_when: efivar_write.rc not in [0, 90]
|
||||
|
||||
- name: Reboot into the new kernel
|
||||
become: true
|
||||
ansible.builtin.reboot:
|
||||
reboot_timeout: 600
|
||||
when: kernel_pkg.changed or boot_order.changed or sys_upgrade.changed
|
||||
@@ -72,7 +65,6 @@
|
||||
fail_msg: "Running {{ ansible_kernel }}"
|
||||
|
||||
- name: Remove the deckify kernel
|
||||
become: true
|
||||
community.general.pacman:
|
||||
name:
|
||||
- linux-cachyos-deckify
|
||||
|
||||
Reference in New Issue
Block a user