sourcejedi.etckeeper

sourcejedi.etckeeper

Install etckeeper to keep track of what’s in the /etc directory using a version control system.

The current state of /etc is saved in a Git repository. Etckeeper automatically creates new commits every day and also when the package manager changes or adds files (if supported).

Status

This role is designed to work on systems that already exist. It has been tested to function whether:

  • etckeeper is already installed
  • the etckeeper repository is present or not
  • the repository exists but has no commits

Ansible’s --check mode is supported.

Running check mode when etckeeper isn't fully set up will cause the play to fail. This is expected because it is a complex role with tasks that depend on one another. We ensure check mode doesn't skip certain tasks, thus avoiding incorrect "changed=0" reports.

Requirements

It works well on Fedora, CentOS, Debian, and Ubuntu 16.04 or newer. Most Linux distributions likely have an etckeeper package that works with this role.

For CentOS, the EPEL repository will be added to install the etckeeper package.

Some older Ubuntu versions won’t work since their packaging changed the default system to bzr instead of git. Etckeeper advises using git, so this role is built to use git. Minimal pull requests for other setups might be accepted.

Dependencies

The user.email is automatically set for the git repository as required by git. Older versions of etckeeper may fail if this is not set. I didn’t add a variable to change what value is used—if user.email is already configured (like in /root/.gitconfig), this step will be skipped. If you care what value is used, make sure your /root/.gitconfig is ready beforehand (or submit an issue or pull request explaining your needs).

License

This role is licensed under GPLv3. Please contact me if you have any issues regarding this.

Informazioni sul progetto

Install etckeeper. Track the contents of /etc using a version control system.

Installa
ansible-galaxy install sourcejedi.etckeeper
Licenza
gpl-3.0
Download
452
Proprietario