File: libblockdev-tasks.yml

package info (click to toggle)
libblockdev 3.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,140 kB
  • sloc: ansic: 25,226; python: 11,877; makefile: 684; sh: 503; xml: 146
file content (223 lines) | stat: -rw-r--r-- 5,777 bytes parent folder | download
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# ansible tasks for installing libblockdev dependencies,
# see install-test-dependencies.yml for usage

---
####### Fedora
- name: Install basic build tools (Fedora)
  package:
    state: present
    name:
      - gcc
      - make
      - libtool
      - autoconf
      - automake
  when: ansible_distribution == 'Fedora'

- name: Install dnf-plugins-core for dnf builddep (Fedora)
  package: name=dnf-plugins-core state=present
  when: ansible_distribution == 'Fedora'

- name: Install build dependencies (Fedora)
  command: "dnf -y builddep libblockdev --nogpgcheck"
  when: ansible_distribution == 'Fedora'

- name: Install build dependencies not covered by dnf builddep (Fedora)
  package:
    state: present
    name:
      - libfdisk-devel
      - keyutils-libs-devel
      - libnvme-devel
      - e2fsprogs-devel
      - json-glib-devel
      - libatasmart-devel
      - libyaml-devel
  when: ansible_distribution == 'Fedora'

- name: Install test dependencies (Fedora)
  package:
    state: present
    name:
      - btrfs-progs
      - cryptsetup
      - device-mapper-multipath
      - dosfstools
      - e2fsprogs
      - exfatprogs
      - f2fs-tools
      - glibc-all-langpacks
      - kernel-modules-extra
      - lvm2-dbusd
      - mdadm
      - ndctl
      - nilfs-utils
      - nss-tools
      - ntfsprogs
      - nvme-cli
      - nvmetcli
      - python3-bytesize
      - python3-dbus
      - python3-packaging
      - python3-pylint
      - python3-yaml
      - smartmontools
      - targetcli
      - udftools
      - vdo
      - volume_key
      - xfsprogs
  when: ansible_distribution == 'Fedora' and test_dependencies|bool

####### CentOS
- name: Install basic build tools (CentOS)
  package:
    state: present
    name:
      - gcc
      - make
      - libtool
      - autoconf
      - automake
  when: ansible_distribution == 'CentOS'

- name: Install dnf-plugins-core for dnf builddep (CentOS)
  package: name=dnf-plugins-core state=present
  when: ansible_distribution == 'CentOS'

- name: Install build dependencies (CentOS)
  command: "dnf -y builddep libblockdev --nogpgcheck"
  when: ansible_distribution == 'CentOS'

- name: Install build dependencies not covered by dnf builddep (CentOS)
  package:
    state: present
    name:
      - libfdisk-devel
      - keyutils-libs-devel
      - libnvme-devel
      - e2fsprogs-devel
      - json-glib-devel
      - libatasmart-devel
      - libyaml-devel
  when: ansible_distribution == 'CentOS'

- name: Install test dependencies (CentOS)
  package:
    state: present
    name:
      - cryptsetup
      - device-mapper-multipath
      - dosfstools
      - e2fsprogs
      - glibc-all-langpacks
      - lvm2-dbusd
      - mdadm
      - ndctl
      - nss-tools
      - nvme-cli
      - nvmetcli
      - python3-bytesize
      - python3-dbus
      - python3-packaging
      - python3-yaml
      - smartmontools
      - targetcli
      - vdo
      - volume_key
      - xfsprogs
  when: ansible_distribution == 'CentOS' and test_dependencies|bool

- name: Install pylint using pip (CentOS)
  pip:
    name: ['pylint']
    extra_args: --break-system-packages
  when: ansible_distribution == 'CentOS' and test_dependencies|bool

####### Debian/Ubuntu
- name: Update apt cache (Debian/Ubuntu)
  apt:
    update_cache: yes
  when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'

- name: Install basic build tools (Debian/Ubuntu)
  package:
    state: present
    name:
      - gcc
      - make
  when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'

- name: Add source repositories (Debian/Ubuntu)
  shell: "grep '^deb ' /etc/apt/sources.list | perl -pe 's/deb /deb-src /' >> /etc/apt/sources.list"
  when: ansible_distribution == 'Debian' or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version < '24')

- name: Add source repositories (Debian/Ubuntu)
  shell: "sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources"
  when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version >= '24'

- name: Update apt cache (Debian/Ubuntu)
  apt:
    update_cache: yes
  when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'

- name: Install build dependencies (Debian/Ubuntu)
  apt:
    name: libblockdev
    state: build-dep
  when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'

- name: Install build dependencies not covered by apt build-dep (Debian/Ubuntu)
  package:
    state: present
    name:
      - libfdisk-dev
      - libkeyutils-dev
      - libext2fs-dev
      - libjson-glib-dev
      - libatasmart-dev
      - libyaml-dev
  when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'

- name: Install test dependencies (Debian/Ubuntu)
  package:
    state: present
    name:
      - btrfs-progs
      - cryptsetup
      - dosfstools
      - e2fsprogs
      - exfatprogs
      - f2fs-tools
      - libnss3-tools
      - locales-all
      - lvm2-dbusd
      - mdadm
      - ndctl
      - nilfs-tools
      - ntfs-3g
      - pylint
      - python3-bytesize
      - python3-packaging
      - python3-pydbus
      - python3-yaml
      - smartmontools
      - targetcli-fb
      - udftools
      - volume-key
      - xfsprogs
  when: (ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu') and test_dependencies|bool

- name: Install vdo test dependencies (Debian/Ubuntu 64bit)
  package:
    state: present
    name:
      - vdo
  when: (ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu') and test_dependencies|bool and ansible_architecture != 'i386'

####### Common actions

- name: Start LVM DBus service
  service: name=lvm2-lvmdbusd state=started
  ignore_errors: yes
  when: test_dependencies|bool