update_cache: yes
when: ansible_pkg_mgr == "apt"
- - name: Install DEB requirements
+ - name: Install universal DEB requirements
apt:
name: "{{ item }}"
state: present
- fakeroot-ng
- debhelper
- reprepro
- - dchroot
- devscripts
- pbuilder
- pkg-config
- ant
when: ansible_pkg_mgr == "apt"
+ # For now schroot/dchroot are the only package differences. This may change.
+ # Just change this to be a list if that happens.
+ - name: Install DEB requirements (>=18.04)
+ apt:
+ name: schroot
+ state: present
+ when:
+ - ansible_pkg_mgr == "apt"
+ - ansible_distribution_major_version|int >= 18
+
+ - name: Install DEB requirements (<=16.04)
+ apt:
+ name: dchroot
+ state: present
+ when:
+ - ansible_pkg_mgr == "apt"
+ - ansible_distribution_major_version|int <= 16
+
- name: Add the Debian Jessie Key
apt_key:
id: 2B90D010
# This playbook is used to configure static jenkins slaves. It uses
# a hosts file so that nodename can be set per host.
#
-# install python2.7 on xenial nodes
+# install python2.7 on Ubuntu
- hosts: all
become: yes
# this will most likely need changed
- apt: update_cache=yes
when: ansible_pkg_mgr == "apt"
- - name: Install DEB requirements
- become: yes
- apt: name={{ item }} state=present
+ - name: Install universal DEB requirements
+ apt:
+ name: "{{ item }}"
+ state: present
with_items:
- git
- fakeroot
- fakeroot-ng
- debhelper
- reprepro
- - dchroot
- devscripts
- pbuilder
- pkg-config
- curl
when: ansible_pkg_mgr == "apt"
+ # For now schroot/dchroot are the only package differences. This may change.
+ # Just change this to be a list if that happens.
+ - name: Install DEB requirements (>=18.04)
+ apt:
+ name: schroot
+ state: present
+ when:
+ - ansible_pkg_mgr == "apt"
+ - ansible_distribution_major_version|int >= 18
+
+ - name: Install DEB requirements (<=16.04)
+ apt:
+ name: dchroot
+ state: present
+ when:
+ - ansible_pkg_mgr == "apt"
+ - ansible_distribution_major_version|int <= 16
+
- name: Add the Debian Jessie Key
become: yes
when: ansible_pkg_mgr == "apt"