Skip to content

systemd::manage_unit creates conflicting parameter set when enable is set to mask #576

@lelutin

Description

@lelutin

As the title says, the systemd::manage_unit defined type advertises the possibility of setting the ensure parameter to a value of mask but that fails puppet runs.

A simple reproducing case:

systemd::manage_unit { 'tmpfs.mount':
  enable => 'mask',
}

The above produces this catalog compilation error:

Error: Failed to apply catalog: Validation of File[/etc/systemd/system/tmpfs.mount] failed: You cannot specify more than one of content, source, target (file: /etc/puppet/code/environments/feature_branch_name/modules/systemd/manifests/unit_file.pp, line: 105)

This is caused by the fact that manage_unit directly delegates the value of enable to systemd::unit_file but also unconditionally sets the content param for that same resource type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions