created new playbook for nonroot user login, moved package installation stage/order prior to user/group management

This commit is contained in:
2026-06-10 13:57:11 -04:00
parent c31acb2dcc
commit fc565fa3ce
2 changed files with 41 additions and 9 deletions

View File

@@ -0,0 +1,29 @@
- name: Initialize homeserver
hosts: armitage
remote_user: senpai
tasks:
- name: Installing requisite packages
ansible.builtin.include_role:
name: init-server
tasks_from: userspace@install-pkgs
handlers_from: userspace
- name: Disable root user shell login
become: true
ansible.builtin.user:
name: root
shell: /sbin/nologin
tags:
- disable_root_shell
- name: Disable login for root user altogether
become: true
ansible.builtin.user:
name: root
password: "'*'"
tags:
- disable_root_login
- name: Configuring aliases for using git
community.general.git_config:
name: "alias.{{ item[0] }}"
scope: global
value: "{{ item[1] }}"
loop: []