Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Mount units for manage_unit or dropin types #490

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

traylenator
Copy link
Contributor

@traylenator traylenator commented Sep 12, 2024

Pull Request (PR) description

Support addition .mount units in systemd::manage_unit and systemd::manage_dropin.

e.g.

systemd::manage_unit { 'var-lib-sss-db.mount':
  ensure      => $_use_ramdisk,
  unit_entry  => {
    'Description' => 'Mount a ram disk for sssd to use',
  },
  mount_entry => {
    'What'    => 'tmpfs',
    'Where'   => '/var/lib/sss/db',
    'Type'    => 'tmpfs',
    'Options' => "size=300M,mode=0700,uid=sssd,gid=sssd,rootcontext=system_u:object_r:sssd_var_lib_t:s0",
  },
}

@traylenator traylenator added the enhancement New feature or request label Sep 12, 2024
Copy link
Member

@kenyon kenyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits, otherwise looks good.

manifests/manage_unit.pp Outdated Show resolved Hide resolved
types/unit/mount.pp Outdated Show resolved Hide resolved
Support addition `.mount` units in `systemd::manage_unit`
and `systemd::manage_type`.

e.g.

```puppet
systemd::manage_unit { 'var-lib-sss-db.mount':
  ensure      => $_use_ramdisk,
  unit_entry  => {
    'Description' => 'Mount a ram disk for sssd to use',
  },
  mount_entry => {
    'What'    => 'tmpfs',
    'Where'   => '/var/lib/sss/db',
    'Type'    => 'tmpfs',
    'Options' => "size=${ramdisk}M,mode=0700,uid=sssd,gid=sssd,rootcontext=system_u:object_r:sssd_var_lib_t:s0",
  },
}
```

* https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html
@traylenator traylenator merged commit 7ecb058 into voxpupuli:master Sep 13, 2024
28 checks passed
@traylenator traylenator deleted the mount branch September 13, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants