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 management of Swap unit files #502

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Conversation

traylenator
Copy link
Contributor

@traylenator traylenator commented Nov 26, 2024

Pull Request (PR) description

Let .swap unit files be managed with systemd::manage_dropin and systemd::manage_unit.

For example:

systemd::manage_unit{'swapfile.swap':
  ensure        => 'present',
  active        => true,
  enable        => true,
  unit_entry    => {
    'Description' => 'Enable a swapfile at /swapfile',
  }
  swap_entry    => {
    'What' => '/swapfile',
  }
  install_entry => {
    'WantedBy' => 'multi-user.target',
  },
}

Let `.swap` unit files be managed with `systemd::manage_dropin`
and `systemd::manage_unit`.

For example:

```puppet
systemd::manage_unit{'swapfile.swap':
  ensure        => 'present',
  active        => true,
  enable        => true,
  unit_entry    => {
    'Description' => 'Enable a swapfile at /swapfile',
  }
  swap_entry    => {
    'What' => '/swapfile',
  }
  install_entry => {
    'WantedBy' => 'multi-user.target',
  },
}
```

* https://www.freedesktop.org/software/systemd/man/latest/systemd.swap.html
Traditionally the `Install` section is always last
in a unit file.
@bastelfreak bastelfreak merged commit e1e71e5 into voxpupuli:master Nov 26, 2024
32 checks passed
@traylenator traylenator deleted the swap branch November 26, 2024 18:36
@kenyon
Copy link
Member

kenyon commented Nov 26, 2024

Huh, looks like this can pretty much replace our entire swap_file module. https://github.com/voxpupuli/puppet-swap_file

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