cellinfo
/
ansible.apt
Archived
2
0
Fork 0

Remove the default `/etc/apt/sources.list` file.

This commit is contained in:
Jeremy Gardais 2017-08-16 15:48:51 +02:00
parent 4ed70680e8
commit 0f4a1360d1
4 changed files with 12 additions and 0 deletions

View File

@ -2,5 +2,6 @@
## v1.0 ## v1.0
### Features ### Features
* Remove the default `/etc/apt/sources.list` file.
* Manage Stretch repositories. * Manage Stretch repositories.
* Update Apt if any repositories modifications. * Update Apt if any repositories modifications.

View File

@ -15,6 +15,7 @@ Manage APT repos, preferences and configuration for IPR's servers.
## Role Variables ## Role Variables
* **apt_src_list_manage**: If apt sources list files should be managed [default: `true`]. * **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`]. * **apt_stretch_manage**: If Stretch configuration should be managed [default: `true`].
## Example Playbook ## Example Playbook
@ -32,6 +33,7 @@ Manage APT repos, preferences and configuration for IPR's servers.
### Sources List ### Sources List
Manage Debian's sources.list: Manage Debian's sources.list:
* Remove the default `/etc/apt/sources.list` file.
* Add Stretch repositories. * Add Stretch repositories.
* Update Apt if any repositories modifications. * Update Apt if any repositories modifications.

View File

@ -2,5 +2,6 @@
# defaults file for apt # defaults file for apt
apt_src_list_manage: true apt_src_list_manage: true
apt_purge_src_list_file: true
apt_stretch_manage: true apt_stretch_manage: true

View File

@ -2,6 +2,14 @@
# tasks file for apt # tasks file for apt
# Sources list # 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 ## Stretch
- name: CONFIG stretch official sources.list - name: CONFIG stretch official sources.list
apt_repository: apt_repository: