Compare commits

..

No commits in common. "master" and "v1.1.1" have entirely different histories.

4 changed files with 2 additions and 51 deletions

View File

@ -1,9 +1,3 @@
DEPRECATED, see README.md
## v1.1.2
### Enhancements
* Remove Debian installer log files after 4 weeks.
## v1.1.1 ## v1.1.1

View File

@ -1,4 +1,4 @@
# NO LONGER SUPPORTED, please take a look to [apt_install][debops apt_install role] [resources][debops resources role] roles! # PKG_UTILS
1. [Overview](#overview) 1. [Overview](#overview)
2. [Role Variables](#role-variables) 2. [Role Variables](#role-variables)
@ -32,8 +32,6 @@ Manage some packages installation and configuration from 'utils' section (Apt).
* **pkg_utils_updatedb_prunenames**: A list of directory names (without paths) which should not be scanned [default: `[.bzr, .git, .hg, .svn]`]. * **pkg_utils_updatedb_prunenames**: A list of directory names (without paths) which should not be scanned [default: `[.bzr, .git, .hg, .svn]`].
* **pkg_utils_updatedb_prunepaths**: A list of path names of directories which should not be scanned [default: `[/media, /mnt, /tmp, /var/lib/ceph, /var/spool]`]. * **pkg_utils_updatedb_prunepaths**: A list of path names of directories which should not be scanned [default: `[/media, /mnt, /tmp, /var/lib/ceph, /var/spool]`].
* **pkg_utils_updatedb_prunefs**: A list of file system types (as used in /etc/mtab) which should not be scanned [default: `[afs, autofs, binfmt_misc, ceph, cifs, coda, curlftpfs, devfs, devpts, devtmpfs, ecryptfs, fuse.glusterfs, fuse.sshfs, fusesmb, iso9660, lustre, lustre_lite, mfs, ncpfs, NFS, nfs, nfs4, proc, rpc_pipefs, shfs, smbfs, sysfs, ftpfs, tmpfs, udf, usbfs]`]. * **pkg_utils_updatedb_prunefs**: A list of file system types (as used in /etc/mtab) which should not be scanned [default: `[afs, autofs, binfmt_misc, ceph, cifs, coda, curlftpfs, devfs, devpts, devtmpfs, ecryptfs, fuse.glusterfs, fuse.sshfs, fusesmb, iso9660, lustre, lustre_lite, mfs, ncpfs, NFS, nfs, nfs4, proc, rpc_pipefs, shfs, smbfs, sysfs, ftpfs, tmpfs, udf, usbfs]`].
* **pkg_utils_purge_installer_log**: If the installer log files should be removed [default: `true`].
* **pkg_utils_purge_installer_age**: Maximum age of the installer log files before removing [default: `4w`].
### OS Specific Variables ### OS Specific Variables
@ -61,15 +59,6 @@ Please see default value by Operating System file in [vars][vars directory] dire
pkg_utils_old_manage: false pkg_utils_old_manage: false
``` ```
* Don't remove installer log files:
``` yml
- hosts: serverXYZ
roles:
- role: ipr-cnrs.pkg_utils
pkg_utils_purge_installer_log: false
```
## Packages ## Packages
### New Packages ### New Packages
@ -123,12 +112,6 @@ Based on the [Oefenweb module][oefenweb ansible updatedb], thanks!
* Set the default configuration file for *updatedb* and update the database for Mlocate with an handler. * Set the default configuration file for *updatedb* and update the database for Mlocate with an handler.
* Ensure to not scan some path, directories and filesystem. * Ensure to not scan some path, directories and filesystem.
### Installer log files
* Debian installer log all the installation in `/var/log/installer`.
* If a system is stable, you should removed these log files.
* After 4 weeks (by default) this role will remove it.
## Development ## Development
This source code comes from our [Gogs instance][pkg_utils source] and the [Github repo][pkg_utils github] exist just to be able to send the role to Ansible Galaxy… This source code comes from our [Gogs instance][pkg_utils source] and the [Github repo][pkg_utils github] exist just to be able to send the role to Ansible Galaxy…
@ -153,5 +136,3 @@ Jérémy Gardais
[pkg_utils github]: https://github.com/ipr-cnrs/pkg_utils [pkg_utils github]: https://github.com/ipr-cnrs/pkg_utils
[wtfpl website]: http://www.wtfpl.net/about/ [wtfpl website]: http://www.wtfpl.net/about/
[ipr website]: https://ipr.univ-rennes1.fr/ [ipr website]: https://ipr.univ-rennes1.fr/
[debops apt_install role]: https://docs.debops.org/en/master/ansible/roles/debops.apt_install/index.html
[debops resources role]: https://docs.debops.org/en/master/ansible/roles/debops.resources/index.html

View File

@ -59,7 +59,3 @@ pkg_utils_updatedb_prunefs:
- tmpfs - tmpfs
- udf - udf
- usbfs - usbfs
pkg_utils_purge_installer_log: true
pkg_utils_purge_installer_age: '4w'

View File

@ -45,23 +45,3 @@
notify: update mlocate db notify: update mlocate db
# }}} # }}}
# purge log {{{
- name: Find /var/log/installer
find:
path: /var/log/
patterns: 'installer'
age: '{{ pkg_utils_purge_installer_age }}'
register: findresult
when: pkg_utils_purge_installer_log
- name: Remove /var/log/installer older than {{ pkg_utils_purge_installer_age }}
file:
path: "{{ item.path }}"
state: absent
recurse: yes
with_items: '{{ findresult.files }}'
when: pkg_utils_purge_installer_log
# }}}