diff --git a/CHANGELOG.md b/CHANGELOG.md index bb92bec..eceafa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,5 +2,6 @@ ## v1.0 ### Features +* Remove the default `/etc/apt/sources.list` file. * Manage Stretch repositories. * Update Apt if any repositories modifications. diff --git a/README.md b/README.md index d2aa3eb..7e100c3 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Manage APT repos, preferences and configuration for IPR's servers. ## Role Variables * **apt_src_list_manage** : If apt sources list files should be managed [default : `true`]. +* **apt_purge_src_list_file** : If the default sources.file must be absent [default : `true`]. * **apt_stretch_manage** : If Stretch configuration should be managed [default : `true`]. ## Example Playbook @@ -32,6 +33,7 @@ Manage APT repos, preferences and configuration for IPR's servers. ### Sources List Manage Debian's sources.list : +* Remove the default `/etc/apt/sources.list` file. * Add Stretch repositories. * Update Apt if any repositories modifications. diff --git a/defaults/main.yml b/defaults/main.yml index a3ab90b..8b7b58a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,5 +2,6 @@ # defaults file for apt apt_src_list_manage: true +apt_purge_src_list_file: true apt_stretch_manage: true diff --git a/tasks/main.yml b/tasks/main.yml index 290bf93..ce059ae 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,6 +2,14 @@ # tasks file for apt # Sources list +## Purge sources.list file +- name: CONFIG remove sources.list file + file: + path: /etc/apt/sources.list + state: absent + notify: aptitude update + when: apt_purge_src_list_file + ## Stretch - name: CONFIG stretch official sources.list apt_repository: