Description
This role provides base methods for each system role.
Requirement
function defined variables
- function_packages (for container creation)
User defined variables
- users
- usergroups
- network.hostname
- timezone
Roles
- package.auth.sudo
Variables
-
system_home_mirror:
- description:
- URL of the producer's package repository
- hint: This variable is set by each system.
- description:
-
system_local_mirror:
- description:
- URL of the local package repository
- description:
-
system_mirror_directory:
- description:
- path to the root mirror directory on system for all system
- hint: This variable is set by function role.
- description:
-
system_supported_architures:
- description:
- list of system architectures supported by the system role; needed for installer und mirror
- hint: This variable is set by each system.
- description:
-
system_supported_releases:
- description:
- list of system releases supported by the system role; needed for installer und mirror
- hint: This variable is set by each system.
- description:
-
system_container_base_config:
- description:
- path to the base configuration file for containers
- hint: default file is provided by this system role
- description:
-
system_container_root:
- description:
- path to the root directory for each jail
- hint: default file is provided by this system role
- description:
-
system_suppress_container_creation:
- description:
- If this option is set to true, the system will be prepared for container usage, but none will be installed.
- choises: [true, false]
- default: false
- description:
-
system_installer_path:
- description:
- destination path to the directory for the installer
- description:
-
system_answer_path:
- description:
- destination path to the directory for the answer file
- description:
-
system_name:
- description:
- contains the distribution name of a system; needed for gatherpackages
- description:
-
system_gathered_packages:
- description:
- list of all packages; result of gatherpackages
- description:
-
system_upgrade_states:
- description:
- a dictionary with the results of upgrade (see features)
- description:
-
system_app_root:
- description:
- contains the general path for applications without final path separator
- must be set in defaults/main.yml of each system role
- examples:
- Linux: system_app_root: "/usr"
- FreeBSD: system_app_root: "/usr/local"
- OpenBSD: system_app_root: "/usr/local"
- NetBSD: system_app_root: "/usr/pkg"
- default: undefined
- description:
-
system_config_directory:
- description:
- contains the general path for configuration files of applications without final path separator
- must be set in defaults/main.yml of each system role
- examples:
- Linux: system_app_root: "/etc"
- FreeBSD: system_app_root: "/usr/local/etc"
- OpenBSD: system_app_root: "/etc"
- NetBSD: system_app_root: "/usr/pkg/etc"
- default: undefined
- description:
-
system_fallback_admin_method
- description
- This option specifies the fallback method for the administrative access to a system.
- Two values are currently possible:
root
andsudo
- The value
root
enables and sets the password of the root user. - The value
sudo
disables the password of the root user and installs the sudo utility. It requires the SDM packagepackage.auth.sudo
. - The password for both methods will be stored in the <ansible_passwords>-directory.
- default: root
- choices:
- root
- sudo
- Hint: This option is currently under development. Please use it carefully.
- description
-
system_fallback_sudo_username
- description:
- The option
system_fallback_sudo_username
specifies the username with administrative access permissions. - The username does not have to be defined in the global variable
users
. - It is only considered, if the value of
system_fallback_admin_method
is set tosudo
. - The password for this user is stored in the <ansible_passwords>-directory.
- The option
- default: ansible
- Hint: This option is currently under development. Please use it carefully.
- description:
-
system_fallback_sudo_groupname
- description:
- This option specifies the groupname with administrative access permissions.
- The groupname does not have to be defined in the global variable
group
. - It is only considered, if the value of
system_fallback_admin_method
is set tosudo
.
- default: sudo
- Hint: This option is currently under development. Please use it carefully.
- description:
-
system_password_algorithm:
- description:
- This option specifies the algorithm for generating a password.
- All available algorithms can be found at https://passlib.readthedocs.io/en/stable/lib/passlib.hash.html.
- default: sha256
- description:
-
system_installer_images:
- description:
- This option is an array of tuples of installer images.
- A tuple has the following structure: (image, kernel, distribution, release, architecture)
- image: path to the installer image
- kernel: path to the installer kernel. If the installer is within a memdisk image, this option should be an empty string, this option should be an empty string.
- distribution: name of the installer distribution
- release: name of the installer release
- architecture: name of the installer architecture
- It is generated automatically by the child SDM roles.
- description:
Processes
main
- install and configure native packages
configure
- set hostname
- remove obsolete groups
- remove obsolete users
- add groups
- add users
- append groups to users, if defined
- enable or disable root user, depending on variable system_fallback_admin_method
- set timezone
shutdown
- shutdown host
reboot
- reboot host
Features
The task upgrade have to generate a dictionary with the states of upgrade process. The dictionary has following structure:
<inventory_hostname>: host: True|False <name of container 1>: True|False ... : True|False
The key host
contains the upgrade state of the inventory host.
The state True
means that the host or container was upgraded. False
that there are no upgrades for them.
License
BSD-3-Clauses