Merge pull request 'Add a utility directory for template playbooks, inventory, preparation for packaging, and longer term utility program.' (!194) from goroboro/ansible-collection-fedoraserver-general:main into main
Reviewed-on: #194
This commit is contained in:
commit
7398bf70d9
4 changed files with 100 additions and 0 deletions
11
utility/README.md
Normal file
11
utility/README.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# utility - fedoraserver-management
|
||||
|
||||
The folder contains the template playbooks and inventory that form the basis of the
|
||||
fedoraserver-management utility.
|
||||
|
||||
The goal of this part of the project is to create an RPM that installs template playbooks
|
||||
and inventory to /etc/fedoraserver or /etc/ansible/fedoraserver. The RPM should install
|
||||
dependencies including ansible and any required collections.
|
||||
|
||||
A user can either directly edit the inventory and playbooks to run the ansible-playbook command to update system configuration, or can use a utility program (possibly named serverctl) to help with enabling playbooks, configuring playbook variables, editing inventory hosts, or running playbooks.
|
||||
|
||||
3
utility/ansible.cfg
Normal file
3
utility/ansible.cfg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# SPDX-License-Identifier: GPL-3.0
|
||||
[defaults]
|
||||
inventory = inventory/inventory
|
||||
8
utility/inventory/inventory
Normal file
8
utility/inventory/inventory
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# SPDX-License-Identifier: GPL-3.0
|
||||
# Default inventory: manage the local machine.
|
||||
#
|
||||
# To manage remote servers, add one or more lines like:
|
||||
# myserver.example.com ansible_user=fedora
|
||||
|
||||
[server]
|
||||
localhost ansible_connection=local
|
||||
78
utility/playbooks/postinstall.yml
Normal file
78
utility/playbooks/postinstall.yml
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
# SPDX-License-Identifier: GPL-3.0
|
||||
---
|
||||
# Template playbook: postinstall role
|
||||
#
|
||||
# Uncomment the options that you want to change
|
||||
# Defaults are noted in each comment.
|
||||
|
||||
- name: Apply the postinstall role to the server
|
||||
hosts: server
|
||||
become: true
|
||||
vars:
|
||||
|
||||
## --- Security --------------------------------------------------
|
||||
|
||||
## Disable SSH password authentication.
|
||||
## True by default and recommended. Uncomment to keep SSH password authentication.
|
||||
# postinstall_disable_ssh_with_passwords: false
|
||||
|
||||
## To keep SSH password authentication for specified users, uncomment and edit this list.
|
||||
## The fedora user in this list is an example.
|
||||
# sshd_password_users:
|
||||
# - fedora
|
||||
|
||||
## Improve Cockpit web console access security.
|
||||
## False by default, uncomment to enable this feature.
|
||||
# postinstall_increase_cockpit_security: true
|
||||
|
||||
## Allow root to log in over SSH only with a key file.
|
||||
## False by default. Uncomment to enable this feature.
|
||||
# postinstall_root_login_key: true
|
||||
|
||||
## --- Hostname and time ------------------------------------------
|
||||
|
||||
## Set the server hostname and timezone.
|
||||
## False by default. Uncomment to enable, and set both values.
|
||||
# postinstall_hostname_time_configuration: true
|
||||
# server_hostname: fedora
|
||||
# server_timezone: UTC
|
||||
|
||||
## --- Security software ------------------------------------------
|
||||
|
||||
## Install fail2ban, which bans hosts that show malicious behavior.
|
||||
## True by default. uncomment to skip.
|
||||
# postinstall_install_failban: false
|
||||
|
||||
## Install Logwatch, which produces periodic reports of system activity
|
||||
## True by default, uncomment to skip.
|
||||
# postinstall_install_logwatch: false
|
||||
|
||||
## Disable LLMNR and mDNS name resolution in systemd-resolved
|
||||
## True by default, and recommended. Uncomment to skip.
|
||||
# postinstall_disable_llmnr_mdns: false
|
||||
|
||||
## --- Updates -----------------------------------------------------
|
||||
|
||||
## Manage system updates with dnf automatic
|
||||
## True by default. Uncomment to skip.
|
||||
# postinstall_manage_system_updates: false
|
||||
|
||||
## DNF Automatic settings (default values are shown).
|
||||
## Uncomment and edit as needed.
|
||||
# postinstall_automatic_apply_updates: 'no'
|
||||
# postinstall_automatic_email_to: root
|
||||
# postinstall_automatic_email_host: localhost
|
||||
# postinstall_automatic_email_port: 25
|
||||
# postinstall_automatic_email_tls: 'no'
|
||||
|
||||
## Update the system and install additional packages
|
||||
## True by default, uncomment to skip.
|
||||
# postinstall_update_system_software: false
|
||||
|
||||
## To install additional packages uncomment and edit this list.
|
||||
## The htop package in this list is an example.
|
||||
#postinstall_packages:
|
||||
# - htop
|
||||
|
||||
roles:
|
||||
- fedoraserver.general.postinstall
|
||||
Loading…
Add table
Add a link
Reference in a new issue