
On Wed, Mar 21, 2018 at 01:19:59PM +0100, Andrea Bolognani wrote:
As with ad-hoc installation, we want to get rid of ad-hoc package removal. Add a 'blacklist' pseudo-project which can be used for the purpose.
In the future, we might use this facility to keep long-lived guests clean by blacklisting packages as they get dropped from the respective project.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/site.yml | 6 ++++++ guests/tasks/base.yml | 7 ------- guests/vars/mappings.yml | 3 +++ guests/vars/projects/blacklist.yml | 3 +++ 4 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 guests/vars/projects/blacklist.yml
diff --git a/guests/site.yml b/guests/site.yml index d057116..a00be86 100644 --- a/guests/site.yml +++ b/guests/site.yml @@ -24,6 +24,12 @@ vars: project: base
+ # Remove blacklisted packages + - include: tasks/packages.yml + vars: + project: blacklist + state: absent +
This would probably make sense to have in the base task as well since it prepares the base installation.
# Create users. This needs to happen after installing base packages - include: tasks/user.yml
diff --git a/guests/tasks/base.yml b/guests/tasks/base.yml index 5379bf6..0c82b58 100644 --- a/guests/tasks/base.yml +++ b/guests/tasks/base.yml @@ -115,13 +115,6 @@ when: - package_format == 'pkg'
-- name: Remove unwanted packages - package: - name: '{{ item }}' - state: absent - with_items: - - nano - - name: Configure hostname hostname: name: '{{ inventory_hostname }}' diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index f6ac801..deae69d 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -400,6 +400,9 @@ mappings: mingw64-readline: FedoraRawhide: mingw64-readline
+ nano: + default: nano + netcf: deb: libnetcf-dev rpm: netcf-devel diff --git a/guests/vars/projects/blacklist.yml b/guests/vars/projects/blacklist.yml new file mode 100644 index 0000000..e5f369c --- /dev/null +++ b/guests/vars/projects/blacklist.yml @@ -0,0 +1,3 @@ +--- +packages: + - nano
In the past we've installed some packages, that were removed from ansible and it would make sense to list them in the blacklist in order to cleanup existing installations that someone can already have. The list of the removed packages is: polkit-devel glibc-rpcgen on Fedora > 27 (it was glibc-common) Anyway, this can be a followup patch. Reviewed-by: Pavel Hrdina <phrdina@redhat.com>