refactor: remove yum config and fix vars
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
7ac21701b5
commit
a9f5b73d5a
@ -1,7 +1,7 @@
|
||||
---
|
||||
packages_repositories: []
|
||||
# @var packages_repositories:example: >
|
||||
# packages_repositories:
|
||||
packages_yum_repositories: []
|
||||
# @var packages_yum_repositories:example: >
|
||||
# packages_yum_repositories:
|
||||
# - name: epel
|
||||
# filename: Extra-EPEL
|
||||
# desc: Extra Packages for Enterprise Linux (EPEL)
|
||||
@ -9,7 +9,7 @@ packages_repositories: []
|
||||
# gpgkey: "http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-$releasever/"
|
||||
# enabled: True
|
||||
# @end
|
||||
packages_repositories_extra: []
|
||||
packages_yum_repositories_extra: []
|
||||
|
||||
packages_repofiles_remove: []
|
||||
|
||||
@ -26,7 +26,7 @@ packages_upgrade_enabled: False
|
||||
|
||||
packages_packages_enablerepo: []
|
||||
|
||||
packages_packages_install: []
|
||||
packages_packages_install_extra: []
|
||||
packages_install: []
|
||||
packages_install_extra: []
|
||||
|
||||
packages_packages_uninstall: []
|
||||
packages_uninstall: []
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
- name: Adjust packages config file
|
||||
template:
|
||||
src: etc/packages.conf.j2
|
||||
dest: /etc/packages.conf
|
||||
src: etc/dnf/dnf.conf.j2
|
||||
dest: /etc/dnf/dnf.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
@ -1,4 +1,3 @@
|
||||
---
|
||||
- include_tasks: config.yml
|
||||
- include_tasks: repository.yml
|
||||
- include_tasks: packages.yml
|
||||
|
@ -1,17 +0,0 @@
|
||||
---
|
||||
- block:
|
||||
- name: Remove common packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
enablerepo: "{{ packages_packages_enablerepo }}"
|
||||
state: absent
|
||||
loop: "{{ packages_packages_uninstall }}"
|
||||
|
||||
- name: Install common packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
enablerepo: "{{ packages_packages_enablerepo }}"
|
||||
state: present
|
||||
loop: "{{ packages_packages_install + packages_packages_install_extra }}"
|
||||
become: True
|
||||
become_user: root
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
- block:
|
||||
- name: Add common package repositories
|
||||
packages_repository:
|
||||
yum_repository:
|
||||
name: "{{ item.name }}"
|
||||
file: "{{ item.filename }}"
|
||||
description: "{{ item.desc | default(omit) }}"
|
||||
@ -11,7 +11,7 @@
|
||||
sslverify: "{{ item.sslverify | default('yes') }}"
|
||||
enabled: "{{ item.enabled | default('yes') }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
loop: "{{ packages_repositories + packages_repositories_extra }}"
|
||||
loop: "{{ packages_yum_repositories + packages_yum_repositories_extra }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
notify: __packages_upgrade
|
||||
@ -23,5 +23,19 @@
|
||||
loop: "{{ packages_repofiles_remove }}"
|
||||
loop_control:
|
||||
label: "/etc/packages.repos.d/{{ item }}"
|
||||
|
||||
- name: Uninstall common packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
enablerepo: "{{ packages_packages_enablerepo }}"
|
||||
state: absent
|
||||
loop: "{{ packages_uninstall }}"
|
||||
|
||||
- name: Install common packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
enablerepo: "{{ packages_packages_enablerepo }}"
|
||||
state: present
|
||||
loop: "{{ packages_install + packages_install_extra }}"
|
||||
become: True
|
||||
become_user: root
|
||||
|
8
templates/etc/dnf/dnf.conf.j2
Normal file
8
templates/etc/dnf/dnf.conf.j2
Normal file
@ -0,0 +1,8 @@
|
||||
#jinja2: lstrip_blocks: True
|
||||
{{ ansible_managed | comment }}
|
||||
[main]
|
||||
gpgcheck=1
|
||||
installonly_limit=3
|
||||
clean_requirements_on_remove=True
|
||||
best=True
|
||||
skip_if_unavailable=False
|
@ -1,32 +0,0 @@
|
||||
#jinja2: lstrip_blocks: True
|
||||
{{ ansible_managed | comment }}
|
||||
[main]
|
||||
cachedir=/var/cache/yum/$basearch/$releasever
|
||||
keepcache=0
|
||||
debuglevel=2
|
||||
logfile=/var/log/yum.log
|
||||
exactarch=1
|
||||
obsoletes=1
|
||||
gpgcheck=1
|
||||
plugins=1
|
||||
installonly_limit=5
|
||||
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
|
||||
distroverpkg=centos-release
|
||||
{% if packages_deltarpm_value != 0 %}
|
||||
deltarpm={{ packages_deltarpm_value }}
|
||||
deltarpm_percentage={{ packages_deltarpm_percentage }}
|
||||
{% endif %}
|
||||
|
||||
|
||||
# This is the default, if you make this bigger yum won't see if the metadata
|
||||
# is newer on the remote and so you'll "gain" the bandwidth of not having to
|
||||
# download the new metadata and "pay" for it by yum not having correct
|
||||
# information.
|
||||
# It is esp. important, to have correct metadata, for distributions like
|
||||
# Fedora which don't keep old packages around. If you don't like this checking
|
||||
# interupting your command line usage, it's much better to have something
|
||||
# manually check the metadata once an hour (yum-updatesd will do this).
|
||||
# metadata_expire=90m
|
||||
|
||||
# PUT YOUR REPOS HERE OR IN separate files named file.repo
|
||||
# in /etc/yum.repos.d
|
Loading…
Reference in New Issue
Block a user