Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions misc/libblockdev-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
- libtool
- autoconf
- automake
when: ansible_distribution == 'Fedora'
when: ansible_facts['distribution'] == 'Fedora'

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

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

- name: Install build dependencies not covered by dnf builddep (Fedora)
package:
Expand All @@ -33,7 +33,7 @@
- json-glib-devel
- libatasmart-devel
- libyaml-devel
when: ansible_distribution == 'Fedora'
when: ansible_facts['distribution'] == 'Fedora'

- name: Install test dependencies (Fedora)
package:
Expand Down Expand Up @@ -67,7 +67,7 @@
- vdo
- volume_key
- xfsprogs
when: ansible_distribution == 'Fedora' and test_dependencies|bool
when: ansible_facts['distribution'] == 'Fedora' and test_dependencies|bool

####### CentOS
- name: Install basic build tools (CentOS)
Expand All @@ -79,15 +79,15 @@
- libtool
- autoconf
- automake
when: ansible_distribution == 'CentOS'
when: ansible_facts['distribution'] == 'CentOS'

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

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

- name: Install build dependencies not covered by dnf builddep (CentOS)
package:
Expand All @@ -100,7 +100,7 @@
- json-glib-devel
- libatasmart-devel
- libyaml-devel
when: ansible_distribution == 'CentOS'
when: ansible_facts['distribution'] == 'CentOS'

- name: Install test dependencies (CentOS)
package:
Expand All @@ -126,46 +126,46 @@
- vdo
- volume_key
- xfsprogs
when: ansible_distribution == 'CentOS' and test_dependencies|bool
when: ansible_facts['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
when: ansible_facts['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'
when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu'

- name: Install basic build tools (Debian/Ubuntu)
package:
state: present
name:
- gcc
- make
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
when: ansible_facts['distribution'] == 'Debian' or ansible_facts['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')
when: ansible_facts['distribution'] == 'Debian' or (ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['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'
when: ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_major_version'] >= '24'

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

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

- name: Install build dependencies not covered by apt build-dep (Debian/Ubuntu)
package:
Expand All @@ -177,7 +177,7 @@
- libjson-glib-dev
- libatasmart-dev
- libyaml-dev
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu'

- name: Install test dependencies (Debian/Ubuntu)
package:
Expand Down Expand Up @@ -206,14 +206,14 @@
- udftools
- volume-key
- xfsprogs
when: (ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu') and test_dependencies|bool
when: (ansible_facts['distribution'] == 'Debian' or ansible_facts['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'
when: (ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu') and test_dependencies|bool and ansible_facts['architecture'] != 'i386'

####### Common actions

Expand Down
Loading