Adjust for FreeBSD root group being wheel.
This commit is contained in:
parent
81d59aabb3
commit
319a717e68
17
facts/user_names.yml
Normal file
17
facts/user_names.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
# Define users and groups for each OS
|
||||
|
||||
- name: Set Linux User Variables
|
||||
ansible.builtin.set_fact:
|
||||
root: root
|
||||
root_group: root
|
||||
ansible: ansible
|
||||
when: ansible_distribution == "Pop!_OS" or
|
||||
ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: Set FreeBSD User Variables
|
||||
ansible.builtin.set_fact:
|
||||
root: root
|
||||
root_group: wheel
|
||||
ansible: ansible
|
||||
when: ansible_distribution == "FreeBSD"
|
@ -11,11 +11,12 @@
|
||||
- include: facts/filesystem_names.yml
|
||||
- include: facts/package_names.yml
|
||||
- include: facts/service_names.yml
|
||||
- include: facts/user_names.yml
|
||||
|
||||
tasks:
|
||||
- include: tasks/packages.yml
|
||||
- include: tasks/users.yml
|
||||
- include: tasks/cron.yml
|
||||
- include: tasks/packages.yml
|
||||
- include: tasks/harden.yml
|
||||
|
||||
|
||||
|
@ -8,13 +8,13 @@
|
||||
|
||||
- name: Create Ansible User
|
||||
user:
|
||||
name: ansible
|
||||
name: "{{ ansible }}"
|
||||
system: yes
|
||||
|
||||
- name: Add Ansible Sudoers File
|
||||
copy:
|
||||
src: sudoers_ansible
|
||||
dest: "{{ sudoers_install_dir }}"
|
||||
owner: root
|
||||
group: root
|
||||
owner: "{{ root }}"
|
||||
group: "{{ root_group }}"
|
||||
mode: 0440
|
||||
|
Loading…
x
Reference in New Issue
Block a user