aboutsummaryrefslogtreecommitdiffstats
path: root/roles/fedora/tasks/dnf.yml
blob: a0c0db9b3939917057361dbd96dcbb6f2fb23210 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
- name: Configure dnf.conf
  ini_file:
    path: /etc/dnf/dnf.conf
    no_extra_spaces: yes
    section: '{{ item.section }}'
    option: '{{ item.option }}'
    value: '{{ item.value }}'
  with_items:
    - section: main
      option: 'install_weak_deps'
      value: 'False'
    - section: main
      option: 'best'
      value: 'True'
    - section: main
      option: 'deltarpm'
      value: 'False'

- name: Update all packages
  dnf:
    name: '*'
    state: latest
  tags:
    - update
    - packages

- name: Remove packages
  dnf:
    name: '{{ item }}'
    state: absent
  with_items: '{{ packages.remove }}'
  when: "'remove' in packages"
  tags:
    - packages

- name: Install packages
  dnf:
    name: '{{ item }}'
    state: latest
  with_items: '{{ packages.install }}'
  when: "'install' in packages"
  tags:
    - packages

# vim: set ts=2 sw=2 et: