https://github.com/borisskert/ansible_apt_settings
https://github.com/borisskert/ansible_apt_settings
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/borisskert/ansible_apt_settings
- Owner: borisskert
- Created: 2020-10-18T09:11:32.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-19T11:09:31.000Z (10 months ago)
- Last Synced: 2024-12-19T12:22:10.135Z (10 months ago)
- Language: Jinja
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ansible_apt_settings
Setup apt settings, services and timers.
## Supported operating systems
* Ubuntu
* 24.04
* 22.04
* 20.04
* Debian
* 12
* 11## System requirements
* Systemd
## Tasks
* Optional: Setup apt-autoremove service and timer
## Role parameters
| Variable | Type | Mandatory? | Default | Description |
|---------------------------------|---------|------------|---------|----------------------------------------------------|
| apt_settings_autoremove_enabled | boolean | no | false | If true setup the apt-autoremove service and timer |## Example Playbook
### Add to `requirements.yml`:
```yaml
- name: setup-apt-settings
src: https://github.com/borisskert/ansible_apt_settings.git
scm: git
```### Example `playbook.yml`:
```yaml
- hosts: servers
roles:
- role: setup-apt-settings
apt_settings_autoremove_enabled: true
```## Testing
Requirements:
* [Vagrant](https://www.vagrantup.com/)
* [Qemu](https://www.qemu.org/libvirt) and [libvirt](https://libvirt.org/)
* [Ansible](https://docs.ansible.com/)
* [Molecule](https://molecule.readthedocs.io/en/latest/index.html)
* [yamllint](https://yamllint.readthedocs.io/en/stable/#)
* [ansible-lint](https://docs.ansible.com/ansible-lint/)
* [Docker](https://docs.docker.com/)### Run within docker
```shell script
molecule test --parallel && molecule test --scenario-name enable-autoremove --parallel
```### Run within Vagrant
```shell script
molecule test --scenario-name vagrant-enable-autoremove --parallel
```I recommend to use [pyenv](https://github.com/pyenv/pyenv) for local testing.
Within the GitHub Actions pipeline I use [my own molecule action](https://github.com/borisskert/molecule-action).## License
MIT
## Author Information
* [borisskert](https://github.com/borisskert)