Syncing current state.

This commit is contained in:
2021-12-19 21:32:19 -06:00
parent eb39acaa06
commit 94a4736839
20 changed files with 1599 additions and 180 deletions

View File

@@ -1,29 +1,13 @@
---
###
# This role installs the basic package and host setup for AniNIX operations.
#
#
#
- name: Set up AniNIX-specific repository
become: yes
file:
path: /opt/aninix
state: directory
- name: Verify GPG keys
ignore_errors: yes
become: yes
command:
cmd: gpg --homedir /etc/pacman.d/gnupg --list-key 1CC1E3F4ED06F296
register: gpg_verify
when: ansible_os_family == "Archlinux"
- name: Install GPG keys
become: yes
command:
cmd: /bin/bash -l -c 'pacman-key --recv-key 1CC1E3F4ED06F296; pacman-key --finger 1CC1E3F4ED06F296; pacman-key --lsign-key 1CC1E3F4ED06F296;'
when: ansible_os_family == "Archlinux" and gpg_verify.rc != 0
- name: Set up pacman.conf
become: yes
blockinfile:
@@ -88,13 +72,14 @@
become: yes
copy:
dest: /etc/sudoers.d/basics
content: "{{ lookup('env','USER') }} ALL=(ALL) NOPASSWD: ALL\n"
content: "{{ ansible_user_id }} ALL=(ALL) NOPASSWD: ALL\n"
# Remove unneeded file
- file:
path: /etc/sudoers.d/1001
state: absent
- name: Ensure we include /etc/sudoers.d
become: yes
lineinfile:
path: /etc/sudoers
regexp: "includedir /etc/sudoers.d"
line: "includedir /etc/sudoers.d"
- name: Test root password
ignore_errors: yes