diff --git a/.README.html b/.README.html index 51f98a4..edca4d1 100644 --- a/.README.html +++ b/.README.html @@ -173,6 +173,8 @@
See below
+NOTE: Support for user units is not available in EL7 or +earlier. This feature is only available in EL8 and later.
In order to manage rpm-ostree
systems, the role requires
modules from external collections. Use the following command to install
@@ -199,6 +202,22 @@
List of variables consumed by the role follows, note that none of them is mandatory.
+Each of the variables can either be a list of strings, or a list of
+dicts
.
The list of strings form assumes that the items to be managed are
+system units owned by root
, and for files, assumes that the
+files should be present
.
The list of dict
form looks like this:
systemd_unit_files:
+ - item: some.service
+ user: my_user
+ state: [present|absent]
Use the dict
form to manage user units, and to remove
+unit files. If using user units, the role will manage lingering for
+those users.
NOTE: Support for user units is not available in EL7 or +earlier. This feature is only available in EL8 and later.
List of systemd unit file names that should be deployed to managed nodes.
@@ -241,45 +260,85 @@Example of setting the variables:
-systemd_unit_files:
- - foo.service
- - bar.service
-systemd_dropins:
- - cups.service.conf.j2
- - avahi-daemon.service.conf.j2
-systemd_started_units:
- - foo.service
- - bar.service
-systemd_enabled_units:
- - foo.service
- - bar.service
Example of setting the variables for the simple list of strings +format:
+systemd_unit_files:
+ - foo.service
+ - bar.service
+systemd_dropins:
+ - cups.service.conf.j2
+ - avahi-daemon.service.conf.j2
+systemd_started_units:
+ - foo.service
+ - bar.service
+systemd_enabled_units:
+ - foo.service
+ - bar.service
Example of setting the variables for the list of dict
+format:
systemd_unit_files:
+ - item: foo.service
+ user: root
+ state: present
+ - item: bar.service
+ user: my_user
+ state: absent
+systemd_dropins:
+ - item: cups.service.conf.j2
+ user: root
+ state: present
+ - item: avahi-daemon.service.conf.j2
+ user: my_user
+ state: absent
+systemd_started_units:
+ - item: foo.service
+ user: root
+ - item: bar.service
+ user: my_user
+systemd_enabled_units:
+ - item: foo.service
+ user: root
+ - item: bar.service
+ user: my_user
systemd_units
Variable shall contain a list of dictionaries where each entry -describes state of one systemd unit present on the managed host.
+The variable is a dict
. Each key is the name of a
+systemd unit. Each value is a dict with fields that describe the state
+of that systemd unit present on the managed host for the system
+scope.
systemd_units_user
Variable shall contain a dict. Each key is the name of a user given
+in one of the lists passed to the role, and root
(even if
+root
is not given). Each value is a dict of systemd units
+for that user, or system units for root
, in the format of
+systemd_units
above.
- name: Deploy and start systemd unit
- hosts: all
- vars:
- systemd_unit_file_templates:
- - foo.service.j2
- systemd_started_units:
- - foo.service
- systemd_enabled_units:
- - foo.service
- roles:
- - linux-system-roles.systemd
- name: Deploy and start systemd unit
+ hosts: all
+ vars:
+ systemd_unit_file_templates:
+ - foo.service.j2
+ systemd_started_units:
+ - item: foo.service
+ user: root
+ - item: bar.service
+ user: my_user
+ systemd_enabled_units:
+ - foo.service
+ roles:
+ - linux-system-roles.systemd
See README-ostree.md
MIT
Michal Sekletar msekleta@redhat.com
+href="mailto:msekleta@redhat.com">msekleta@redhat.com Rich Megginson +rmeggins@redhat.com