adding fedora stuff

This commit is contained in:
2024-07-22 12:10:55 -07:00
parent 82cc422756
commit c58d299d18
138 changed files with 278 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
- name: Restart NetworkManager
service:
name: NetworkManager
state: restarted
+41
View File
@@ -0,0 +1,41 @@
---
- name: Create groups
group:
name: "{{ item }}"
state: present
loop: "{{ init_groups }}"
- name: Ensure Users are Configured Correctly
user:
name: "{{ item.value.name }}"
group: "{{ item.value.group }}"
groups: "{{ item.value.groups }}"
state: "{{ item.value.state }}"
create_home: "{{ item.value.create_home }}"
shell: "{{ item.value.shell }}"
loop: "{{ init_users | dict2items }}"
- name: Create or ensure presence of custom home directories
file:
path: /home/opal/{{ item }}
state: directory
mode: '0755'
owner: opal
group: opal
loop: "{{ create_directories }}"
- name: Remove default home directories if present
file:
path: /home/opal/{{ item }}
state: absent
loop: "{{ remove_directories }}"
# SSH Initial Setup
- name: Create/Ensure ~/.ssh directories
file:
path: "/home/{{ item.value.name }}/.ssh"
state: directory
mode: 0700
owner: "{{ item.value.name }}"
group: "{{ item.value.group }}"
loop: "{{ init_users | dict2items }}"
+6
View File
@@ -0,0 +1,6 @@
# MANAGED BY ANSIBLE #
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=true
+4
View File
@@ -0,0 +1,4 @@
# This file is managed by Ansible #
nameserver 1.1.1.2
nameserver 1.0.0.2
nameserver 2606:4700:4700:0:0:0:0:1112
+33
View File
@@ -0,0 +1,33 @@
---
init_groups:
- wheel
remove_directories:
- Templates
- Videos
- Documents
- Music
- Downloads
- Pictures
- Public
- Desktop
create_directories:
- documents
- music
- downloads
- pictures
- scripts
- projects
- src
- .config
init_users:
opal:
name: opal
group: opal
groups:
- wheel
state: present
shell: /bin/bash
create_home: true