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
|
# This is a simple ansible playbook for installing packages needed by the
# libbytesize test suite.
# You can do this by using 'make install-requires' or manually using
# 'ansible-playbook -K -i "localhost," -c local install-test-dependencies.yml'
# Currently only Fedora and Debian/Ubuntu are supported by this playbook.
---
- hosts: all
become: true
tasks:
- name: Install basic build tools (Fedora)
package: name={{item}} state=present
with_items:
- 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 libbytesize --nogpgcheck"
when: ansible_distribution == 'Fedora'
- name: Install test dependencies (Fedora)
package: name={{item}} state=present
with_items:
- glibc-all-langpacks
- python3-polib
- python3-pocketlint
- python3-pylint
- python3-pycodestyle
when: ansible_distribution == 'Fedora'
- name: Install basic build tools (Debian/Ubuntu)
package: name={{item}} state=present
with_items:
- 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'
- 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: libbytesize
state: build-dep
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- name: Install test dependencies (Debian/Ubuntu)
package: name={{item}} state=present
with_items:
- locales-all
- python3-polib
- python3-pip
- pycodestyle
- pylint
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- name: Install pocketlint using pip on Debian/Ubuntu
pip:
name: ['pocketlint']
executable: pip3
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|