Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smoeding/puppet-chattr
Manage file attributes using Puppet
https://github.com/smoeding/puppet-chattr
chattr puppet puppet-module
Last synced: about 2 months ago
JSON representation
Manage file attributes using Puppet
- Host: GitHub
- URL: https://github.com/smoeding/puppet-chattr
- Owner: smoeding
- License: bsd-2-clause
- Created: 2023-12-28T10:51:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-30T19:08:42.000Z (about 1 year ago)
- Last Synced: 2024-10-31T04:04:45.577Z (3 months ago)
- Topics: chattr, puppet, puppet-module
- Language: Ruby
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# chattr
[![Build Status](https://github.com/smoeding/puppet-chattr/actions/workflows/CI.yaml/badge.svg)](https://github.com/smoeding/puppet-chattr/actions/workflows/CI.yaml)
[![Puppet Forge](https://img.shields.io/puppetforge/v/stm/chattr.svg)](https://forge.puppetlabs.com/stm/chattr)
[![License](https://img.shields.io/github/license/smoeding/puppet-chattr.svg)](https://raw.githubusercontent.com/smoeding/puppet-chattr/master/LICENSE)## Table of Contents
1. [Description](#description)
1. [Setup - The basics of getting started with chattr](#setup)
* [Setup requirements](#setup-requirements)
* [Beginning with chattr](#beginning-with-chattr)
1. [Usage - Configuration options and additional functionality](#usage)
1. [Limitations - OS compatibility, etc.](#limitations)
1. [Development - Guide for contributing to the module](#development)## Description
This module contains the `chattr` custom type to add or remove file attributes from a file on a Linux filesystem. One of the most useful file attributes that can be managed with this type is `immutable` to prevent any future modification of the file.
## Setup
### Setup Requirements
The module contains a custom type so pluginsync must be enabled.
### Beginning with chattr
Set the immutable file attribute for a configuration file that should not be modified after the initial installation:
``` puppet
chattr { '/etc/machine-id':
immutable => true,
}
```## Usage
The type implements an optional boolean parameter for each file attribute. The current setting for the file attribute will not be changed if you leave the parameter unset.
Setting the parameter to `true` will set the attribute and setting the parameter to `false` will remove the attribute from the file.
## Limitations
The module does not yet support all available file attributes.
Some file attributes are read-only and can't be changed.
Also note that different file systems might support different subsets of the available file attributes. Check if the intended file attribute is really available on your system.
## Development
Feel free to open issues or pull requests on Github.