ansible-lint --fix

This commit is contained in:
Mark Riedesel 2024-11-22 10:45:41 -06:00
parent 5634cd32d3
commit faa046aa21
21 changed files with 181 additions and 179 deletions

View file

@ -1,14 +1,14 @@
---
- name: archinstall | install os | check for presence of previously pacstrapped /mnt
stat:
ansible.builtin.stat:
path: /mnt/usr/lib
register: existing_pacstrap
- debug:
- ansible.builtin.debug:
var: existing_pacstrap
- name: archinstall | install os | pacstrap
shell: "pacstrap /mnt {{ packages | join(' ') }}"
ansible.builtin.command: "pacstrap /mnt {{ packages | join(' ') }}"
vars:
packages:
- ansible
@ -26,56 +26,54 @@
when: not existing_pacstrap.stat.exists
- name: archinstall | install os | copy pacman mirrorlist
copy:
ansible.builtin.copy:
remote_src: true
src: /etc/pacman.d/mirrorlist
dest: /mnt/etc/pacman.d/mirrorlist
- name: archinstall | install os | propagate root authorized keys
copy:
ansible.builtin.copy:
remote_src: true
src: /root/.ssh/authorized_keys
dest: /mnt/root/.ssh/authorized_keys
- name: archinstall | install os | passwordless sudo for group wheel
copy:
ansible.builtin.copy:
content: "%wheel ALL=(ALL) NOPASSWD: ALL"
dest: /mnt/etc/sudoers.d/wheel-group-nopasswd
- name: archinstall | install os | set timezone
file:
ansible.builtin.file:
src: /usr/share/zoneinfo/US/Central
dest: /mnt/etc/localtime
state: link
- name: archinstall | install os | enable en_US locales
command: sed -i 's/^#en_US/en_US/' /mnt/etc/locale.gen
ansible.builtin.command: sed -i 's/^#en_US/en_US/' /mnt/etc/locale.gen
- name: archinstall | install os | generate locales
command: arch-chroot /mnt locale-gen
ansible.builtin.command: arch-chroot /mnt locale-gen
- name: archinstall | install os | generate template for arch-chroot installation
template:
ansible.builtin.template:
src: arch_chroot_install.sh
dest: /mnt/arch_chroot_install.sh
mode: "0755"
- name: archinstall | install os | set hostname
copy:
ansible.builtin.copy:
dest: /mnt/etc/hostname
content: |
{{ inventory_hostname }}
- name: archinstall | install os | run installation script in arch-chroot
command: arch-chroot /mnt /arch_chroot_install.sh
ansible.builtin.command: arch-chroot /mnt /arch_chroot_install.sh
register: chroot
- name: archinstall | install os | arch-chroot install output
debug:
ansible.builtin.debug:
msg: "{{ chroot.stdout_lines }}"
- name: archinstall | install os | remove arch-chroot installation script
file:
ansible.builtin.file:
path: /mnt/arch_chroot_install.sh
state: absent