diff --git a/.README.html b/.README.html index 51f98a4..edca4d1 100644 --- a/.README.html +++ b/.README.html @@ -173,6 +173,8 @@

Contents

  • Example Playbook
  • @@ -189,7 +191,8 @@

    Contents

    units. Role is a convenience wrapper around systemd and template Ansible Core modules.

    Requirements

    -

    See below

    +

    NOTE: Support for user units is not available in EL7 or +earlier. This feature is only available in EL8 and later.

    Collection requirements

    In order to manage rpm-ostree systems, the role requires modules from external collections. Use the following command to install @@ -199,6 +202,22 @@

    Collection requirements

    Role Variables

    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.

    systemd_unit_files

    List of systemd unit file names that should be deployed to managed nodes.

    @@ -241,45 +260,85 @@

    systemd_unmasked_units

    required, allowing for custom handling of the reboot requirement. If this variable is not set, the role will fail to ensure the reboot requirement is not overlooked.

    -

    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

    Variables Exported by the Role

    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.

    Example Playbook

    -
    - 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

    rpm-ostree

    See README-ostree.md

    License

    MIT

    Author

    Michal Sekletar msekleta@redhat.com

    +href="mailto:msekleta@redhat.com">msekleta@redhat.com Rich Megginson +rmeggins@redhat.com

    diff --git a/CHANGELOG.md b/CHANGELOG.md index ee102a2..7086583 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ Changelog ========= +[1.3.0] - 2024-11-12 +-------------------- + +### New Features + +- feat: support user units (#67) + [1.2.1] - 2024-10-30 --------------------