{"id":120,"sha1":"076003270fde0e52d1a5c56dd84192ce3e32c447","playbook":{"id":2,"items":{"plays":18,"tasks":603,"results":2357,"hosts":15,"files":157,"records":0},"arguments":{"version":null,"verbosity":0,"private_key_file":null,"remote_user":null,"connection":"openstack.osa.ssh","timeout":null,"ssh_common_args":null,"sftp_extra_args":null,"scp_extra_args":null,"ssh_extra_args":null,"ask_pass":false,"connection_password_file":null,"force_handlers":true,"flush_cache":false,"become":false,"become_method":"sudo","become_user":null,"become_ask_pass":false,"become_password_file":null,"tags":["all"],"skip_tags":[],"check":false,"diff":false,"inventory":["/home/zuul/src/opendev.org/openstack/openstack-ansible/inventory/dynamic_inventory.py","/home/zuul/src/opendev.org/openstack/openstack-ansible/inventory/inventory.ini","/etc/openstack_deploy/inventory.ini"],"listhosts":false,"subset":null,"extra_vars":"Not saved by ARA as configured by 'ignored_arguments'","vault_ids":[],"ask_vault_pass":false,"vault_password_files":[],"forks":4,"module_path":null,"syntax":false,"listtasks":false,"listtags":false,"step":false,"start_at_task":null,"args":["setup-hosts.yml"]},"labels":[{"id":1,"name":"check:False"},{"id":2,"name":"tags:all"}],"started":"2025-12-14T10:04:43.190296Z","ended":"2025-12-14T10:14:53.851603Z","duration":"00:10:10.661307","name":null,"ansible_version":"2.18.6","client_version":"1.7.4","python_version":"3.13.5","server_version":"1.7.4","status":"completed","path":"/home/zuul/src/opendev.org/openstack/openstack-ansible/playbooks/setup-hosts.yml","controller":"aio1.openstack.local","user":"root"},"content":"---\n# Copyright 2017, Rackspace US, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nsystemd_user_name: root\nsystemd_group_name: root\nsystemd_slice_name: system\n\n# Restart services when a change occurs\nsystemd_service_restart_changed: true\n\n# This is the prefix used for all temp files of a given type.\nsystemd_tempd_prefix: tempd\n\n# Give a reasonable amount of time for the server to start up/shut down\nsystemd_service_timeout_sec: \"{{ systemd_TimeoutSec | default(120) }}\"\nsystemd_service_restart: \"{{ systemd_Restart | default('on-failure') }}\"\nsystemd_service_restart_sec: \"{{ systemd_RestartSec | default(2) }}\"\n\n# Accounting options\nsystemd_service_cpu_accounting: \"{{ systemd_CPUAccounting | default(true) }}\"\nsystemd_service_block_io_accounting: \"{{ systemd_BlockIOAccounting | default(true) }}\"\nsystemd_service_memory_accounting: \"{{ systemd_MemoryAccounting | default(true) }}\"\nsystemd_service_tasks_accounting: \"{{ systemd_TasksAccounting | default(true) }}\"\n\n# Sandboxing options\nsystemd_service_private_tmp: \"{{ systemd_PrivateTmp | default(false) }}\"\nsystemd_service_private_devices: \"{{ systemd_PrivateDevices | default(false) }}\"\nsystemd_service_private_network: \"{{ systemd_PrivateNetwork | default(false) }}\"\nsystemd_service_private_users: \"{{ systemd_PrivateUsers | default(false) }}\"\n\n# Start service after a given target. This is here because we want to define common\n#  after targets used on most services. This can be overridden or agumented using\n#  the \"systemd_services\" dictionary option \"after_targets\".\nsystemd_after_targets:\n  - syslog.target\n  - network-online.target\n\n# List of documentation information that will be presented in the unit. This\n#  option is a list of documentation items which can be local or online.\n#  Usage: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Documentation=\nsystemd_unit_docs: []\n\n# Set the service enabled state. Valid options are: [yes, no]\nsystemd_service_enabled: true\n\n# Set global service overrides used within the service unit file.\nsystemd_service_config_overrides: {}\n\n# Systemd service type. Options include simple, forking, oneshot, etc.\n# https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=\nsystemd_default_service_type: simple\n\n# System run directory used for services by default.\n#   Service name will be added to make a unique path.\n#   This option can also be defined for specific service entries under \"systemd_services\".\nsystemd_run_dir: \"/run\"\n\n# System lock directory used for services by default.\n#   Service name will be added to make a unique path.\n#   This option can also be defined for specific service entries under \"systemd_services\".\nsystemd_lock_dir: \"/run/lock\"\n\n# Global Environment variables for system services.\n#  This option will provide the operator a way to set additional environment options\n#  used within the execution of a given service. Environment variables can be passed\n#  into the service using ADHOC options or through a given environment file. If both\n#  options are specified, and a collision occurs options will be set in the order in\n#  which they are read (top to bottom) with a given file being processed last.\n#\n#  If the `systemd_environment_file` is defined a file will be read into the systemd service\n#  unit, the contents of the file will be added to the execution environment of the service.\n#\n# The `systemd_environment_file` option is a string. The full path to a given file must be used.\n#  systemd_environment_file: \"/etc/default/default-file\"\n#\n# The `systemd_environmen`t option is a hash. each item in the hash is expected to be a sting\n# Example\n#   systemd_environment:\n#     VAR1: \"word1 word2\"\n#     VAR2: \"word3\"\n#     VAR3: \"$word 5 6\"\nsystemd_environment: {}\n\n# Set the systemd \"partof\" directive. This ties a service unit to another.\n# Documentation for PartOf can be found here\n# https://www.freedesktop.org/software/systemd/man/systemd.unit.html#PartOf=\n# systemd_partof: unit-name.service\n\n# The systemd services dictionary is a set of services that will be created. The dictionary\n#  can contain the following options:\n#  `service_name` -- (required) used to define the name of the service. This is typically the name of the executable.\n#  `service_type` -- (optional) Set the service type, default is \"simple\".\n#  `execstartpres` -- (optional) Set the program that wil lexecute before service startup.\n#  `execstarts` -- (required) Set the program to start, when the service is simple the list has a max length of 1.\n#  `execstops` -- (optional) Set the program to stop, when the service is simple the list has a max length of 1.\n#  `execstopposts` -- (optional) Set the program that wil lexecute after service stop.\n#  `after_targets` -- (optional) Start the service after this list of dependency units.\n#  `partof` -- (optional) Set the systemd \"partof\" directive. This ties a service unit to another.\n#  `config_overrides` -- (optional) This allows any section or key=value pair to be set within the systemd unit file.\n#  `program_sandboxing` -- (optional) Case sensitive Key=Value pairs for service Sandboxing\n#  `program_accounting` -- (optional) Case sensitive Key=Value pairs for service Accounting\n#  `enabled` -- (optional) Set the enabled state of the service.\n#  `state` -- (optional) Set the running state of the service.\n#  `environment` -- (optional) set additional environment settings, this option is a hash of strings.\n#  `environment_file` -- (optional) set additional environment settings through a given file. this option is a string.\n#  `dynamic_user` -- (optional) Dynamically set a UNIX user and group when the unit is started; only works if systemd >= 235.\n#  `template_arguments` -- (optional) List of arguments that would be enabled/started in case service is a template.\n#                          For that to work properly, service_name should end with `@`, ie `dhcpcd@`\n#                          Systemd service template documentation can be found by the link:\n#                          https://www.freedesktop.org/software/systemd/man/systemd.service.html#Service%20Templates\n#  `state_directory` -- (optional) Relative path the state directory; only works if systemd >= 235.\n#  `systemd_overrides` -- (optional) Dictionary that may contain custom structure in config_overrides format that\n#                         will be used to generate systemd overrides in /etc/systemd/system/service_name.service.d/overrides.conf\n#  `systemd_overrides_only` -- (optional) Boolean variable, when True no service_name.service will be generated and role\n#                              will place only overrides for the existing service.\n#  `systemd_run_dir` -- (optional) Run directory that will be used for service runtime. Service slice or name is added to the path\n#  `systemd_lock_dir` -- (optional) Lock directory that will be used for service runtime. Service slice or name is added to the path\n#  `load` -- (optional) Boolean to set if the service is loaded. Socket activated services with '@' may not need to be loaded.\n#  `standard_output` -- (optional) Set the stdout of the service to go to a non default destination, such as 'socket'\n\n# Under the service dictionary the \"sockets\" key can be added, which may contain list of the sockets\n#  for the given service_name. Each socket in the lsit may have following structure:\n#  `socket_name` -- (required) Name of created socket\n#  `after_targets` -- (optional) Start the socket after this list of dependency units.\n#  `before_targets` -- (optional) Start the socket before this list of dependency units.\n#  `bind_targets` -- (optional) Bind the socket to this dependency unit.\n#  `enabled` -- (optional) Set the enabled state of the socket.\n#  `options` -- (optional) Additional options, like `ListenStream` or other. Specifying ListenStream in\n#               the options will suppress the default 'Service' field in [Socket].\n#  `state` -- (optional) Set the running state of the socket.\n\n# Under the service dictionary the \"timer\" key can be added which will enable a given service\n#  as a timer (Legacy cron job).\n#  `options` -- (optional) This allows any section or key=value pair to be set within the systemd timer file.\n#  `cron_minute` -- (optional) This allows for \"on calendar configuration\" (AKA CRON) for the minute segment.\n#  `cron_hour` -- (optional) This allows for \"on calendar configuration\" (AKA CRON) for the hour segment.\n#  `cron_day` -- (optional) This allows for \"on calendar configuration\" (AKA CRON) for the day segment.\n#  `cron_weekday` -- (optional) This allows for \"on calendar configuration\" (AKA CRON) for the weekday segment.\n#  `cron_month` -- (optional) This allows for \"on calendar configuration\" (AKA CRON) for the month segment.\n\n#  Examples:\n#   systemd_services:\n#     - service_name: ServiceU\n#       config_overrides: {}  # This is used to add in arbitratry unit file options\n#       execstarts:\n#         - ServiceU\n#           environment_file: \"/etc/default/default-file\"\n#\n#     - service_name: ServiceV\n#       config_overrides: {}  # This is used to add in arbitratry unit file options\n#       execstarts:\n#         - ServiceV\n#           environment:\n#             VAR1: \"word1 word2\"\n#             VAR2: \"word3\"\n#             VAR3: \"$word 5 6\"\n#\n#     - service_name: ServiceW\n#       config_overrides: {}  # This is used to add in arbitratry unit file options\n#       execstarts:\n#         - ServiceW\n#\n#     - service_name: ServiceX\n#       config_overrides: {}  # This is used to add in arbitratry unit file options\n#       execstarts:\n#         - ServiceX\n#       program_sandboxing:\n#         PrivateTmp: true\n#       program_accounting:\n#         CPUAccounting: true\n#\n#     - service_name: ServiceY\n#       config_overrides: {}  # This is used to add in arbitratry unit file options\n#       execstarts:\n#         - '/usr/bin/ServiceY'\n#       execstarts:\n#         - '/usr/bin/stopcmd'\n#       restart_changed: no\n#\n#     - service_name: ServiceZ\n#       config_overrides: {}  # This is used to add in arbitratry unit file options\n#       enabled: no\n#       state: stopped\n#       service_type: oneshot\n#       execstarts:\n#         - /usr/bin/startcmd1\n#         - /usr/bin/startcmd2\n#       execstops\n#         - /usr/bin/stopcmd1\n#         - /usr/bin/stopcmd2\n#       execstopposts:\n#         - /usr/local/bin/hook\n#       sockets:\n#         - socket_name: SocketServiceZ\n#           after_targets:\n#             - ServiceZ.socket\n#           before_targets:\n#             - ServiceY.service\n#           bind_targets:\n#             - ServiceZ.socket\n#           enabled: true\n#           state: started\n#           options:\n#             SocketMode: 0600\n#             ListenStream: /var/run/ServiceZ\n#\n#     - service_name: TimerServiceW\n#       config_overrides: {}  # This is used to add in arbitratry unit file options\n#       execstarts:\n#         - '/usr/bin/ServiceY'\n#       restart_changed: no\n#       timer:\n#         state: \"started\"\n#         options:\n#           OnBootSec: 30min\n#           OnUnitActiveSec: 1h\n#           Persistent: true\n#\n#     - service_name: TimerServiceX\n#       config_overrides: {}  # This is used to add in arbitratry unit file options\n#       execstarts:\n#         - '/usr/bin/ServiceY'\n#       restart_changed: no\n#       timer:\n#         state: \"started\"\n#         cron_minute: 30\n#         cron_hour: 1\n#\n#     - service_name: ExistingService\n#       config_overrides: {}\n#       systemd_overrides_only: True\n#       systemd_overrides:  # This is used for adjusting existing services with arbitratry options\n#         Unit:\n#           Wants:\n#             - ServiceZ\n#             - ServiceY\n#       restart_changed: no\n#\n# Example below will result in creating 2 templated services: Templated@arg1 and Templated@arg2\n#     - service_name: Templated@\n#       execstarts:\n#         - /tmp/script %i\n#       template_arguments:\n#         - arg1\n#         - arg2\nsystemd_services: []\n","created":"2025-12-14T10:06:51.294142Z","updated":"2025-12-14T10:06:51.294155Z","path":"/home/zuul/src/opendev.org/openstack/ansible-role-systemd_service/defaults/main.yml"}