This commit refactors the playbook by removing the unnecessary conditional block and import related to Dell/Lenovo firmware. This streamlines the playbook, improving readability and reducing complexity without altering the core functionality. The changes focus on code organization and simplification.
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
---
|
|
# file: common/tasks/main.yml
|
|
- name: Ensure there is a default locale set
|
|
ansible.builtin.import_tasks: set-locale.yml
|
|
|
|
- name: Ensure required packages are present on systems
|
|
ansible.builtin.import_tasks: prereq-packages.yml
|
|
|
|
# not sure if needed, but I'll leave it here as a reference if needed.
|
|
# - name: Make /tmp non-executable
|
|
# ansible.builtin.import_tasks: tmp-nonexec.yml
|
|
|
|
# not sure if needed, but I'll leave it here as a reference if needed.
|
|
# - name: Import tasks to ensure creation of unprivileged user
|
|
# ansible.builtin.import_tasks: unpriv-user.yml
|
|
|
|
- name: Import custom fact setting
|
|
ansible.builtin.import_tasks: custom-fact.yml
|
|
|
|
- name: Display custom facts from /etc/ansible/facts.d
|
|
ansible.builtin.debug:
|
|
var: ansible_local['cpu_info']
|
|
|
|
# Not necessary for me
|
|
# - name: Firmware block for x86_64 systems
|
|
# when: "'Dell' in ansible_board_vendor or 'LENOVO' in ansible_board_vendor"
|
|
# block:
|
|
# - name: Import firmware tasks
|
|
# ansible.builtin.import_tasks: additional-firmware.yml
|
|
|
|
# not sure if needed, but I'll leave it here as a reference if needed.
|
|
# - name: Import color-shell tasks for the common-role
|
|
# ansible.builtin.import_tasks: color-shell.yml
|
|
|
|
- name: Import journald tasks for the common-role
|
|
ansible.builtin.import_tasks: edit-journald.yml
|
|
|
|
- name: Import hostname tasks for the common-role
|
|
ansible.builtin.import_tasks: set-hostname.yml
|
|
|
|
- name: Import sudoers tasks for the common-role
|
|
ansible.builtin.import_tasks: sudoers.yml
|
|
|
|
- name: Set the custom message of the day (motd)
|
|
ansible.builtin.import_tasks: motd.yml
|
|
|
|
- name: Perform SSH daemon hardening
|
|
ansible.builtin.import_tasks: ssh-config.yml
|