ansible: fix apt deprecation warning about loops

Fix deprecation warnings like the following:
  [DEPRECATION WARNING]: Invoking "apt" only once while using a loop
  via squash_actions is deprecated. Instead of using a loop to supply
  multiple items  and specifying `name: "{{ item }}"`, please use
  `name: ['libjansson-dev', 'libulfius-dev']` and remove the loop.
  This feature will be removed in version 2.11.

Related: OS#5055
Change-Id: I57b9ce690e8167249468954f3e62d14c7a92fcfc
This commit is contained in:
Oliver Smith 2021-03-08 11:16:35 +01:00
parent 8c48d2020a
commit aee8b3f14b
11 changed files with 260 additions and 288 deletions

View File

@ -2,14 +2,13 @@
- name: add https support
apt:
name: "{{ item }}"
name:
- apt-transport-https
- gnupg
- cron
- ca-certificates
cache_valid_time: 3600
update_cache: yes
with_items:
- apt-transport-https
- gnupg
- cron
- ca-certificates
- name: add docker gpg key to apt keyring
apt_key:

View File

@ -15,12 +15,11 @@
- name: usrp install apt dependecies
apt:
name: "{{ item }}"
name:
- libuhd-dev
- uhd-host
cache_valid_time: 3600
update_cache: yes
with_items:
- libuhd-dev
- uhd-host
register: uhd_installed
- name: usrp download firmware
@ -48,8 +47,7 @@
- name: install osmocom utilities
apt:
name: "{{ item }}"
with_items:
- abisip-find
- osmo-bsc-ipaccess-utils
- osmo-bsc-bs11-utils
name:
- abisip-find
- osmo-bsc-ipaccess-utils
- osmo-bsc-bs11-utils

View File

@ -9,41 +9,39 @@
- name: install osmocom runtime dependencies
apt:
name: "{{ item }}"
with_items:
- build-essential
- git
- automake
- libdbi-dev
- libdbd-sqlite3
- sqlite3
- libsctp-dev
- libortp-dev
- libpcap-dev
- libc-ares-dev
- libtool
- shtool
- pkg-config
- libtalloc-dev
- libpcsclite-dev
- libgnutls28-dev
- libmnl-dev
- libssl-dev
- libczmq-dev
- libsofia-sip-ua-glib-dev
- libsqlite3-dev
- libasound2-dev
- liblua5.3-dev
- lua-socket
name:
- build-essential
- git
- automake
- libdbi-dev
- libdbd-sqlite3
- sqlite3
- libsctp-dev
- libortp-dev
- libpcap-dev
- libc-ares-dev
- libtool
- shtool
- pkg-config
- libtalloc-dev
- libpcsclite-dev
- libgnutls28-dev
- libmnl-dev
- libssl-dev
- libczmq-dev
- libsofia-sip-ua-glib-dev
- libsqlite3-dev
- libasound2-dev
- liblua5.3-dev
- lua-socket
tags:
- osmocom
# mdbus2 is not available in debian10. TODO: compile it for >9
- name: install mdbus2
apt:
name: "{{ item }}"
with_items:
- mdbus2
name:
- mdbus2
when: ansible_distribution == 'Debian' and ansible_distribution_version <= '9'
tags:
- ofono
@ -51,35 +49,32 @@
- name: install srsLTE build-only dependencies
apt:
name: "{{ item }}"
with_items:
- cmake
- libfftw3-dev
- libmbedtls-dev
- libboost-program-options-dev
- libconfig++-dev
- libsctp-dev
- libpcsclite-dev
- libuhd-dev
- libczmq-dev
- libsoapysdr-dev
name:
- cmake
- libfftw3-dev
- libmbedtls-dev
- libboost-program-options-dev
- libconfig++-dev
- libsctp-dev
- libpcsclite-dev
- libuhd-dev
- libczmq-dev
- libsoapysdr-dev
tags:
- srs
- name: install srsLTE runtime extra dependencies (Debian)
apt:
name: "{{ item }}"
with_items:
- soapysdr0.7-module-lms7
name:
- soapysdr0.7-module-lms7
when: ansible_distribution == 'Debian'
tags:
- srs
- name: install srsLTE runtime extra dependencies (Ubuntu)
apt:
name: "{{ item }}"
with_items:
- soapysdr0.6-module-lms7
name:
- soapysdr0.6-module-lms7
when: ansible_distribution == 'Ubuntu'
tags:
- srs
@ -101,9 +96,8 @@
- name: install uhub dependencies
apt:
name: "{{ item }}"
with_items:
- libusb-1.0-0-dev
name:
- libusb-1.0-0-dev
tags:
- modem
@ -172,9 +166,8 @@
- name: install patchelf build dependencies
apt:
name: "{{ item }}"
with_items:
- autoconf
name:
- autoconf
tags:
- patchelf
- osmo-gsm-tester-proc
@ -208,34 +201,32 @@
- name: install gsm tester dependencies (main)
apt:
name: "{{ item }}"
with_items:
- sqlite3
- python3
- python3-setuptools
- python3-yaml
- python3-mako
- python3-gi
- python3-watchdog
- python3-numpy
- python3-websocket
- ofono
- patchelf
- libcap2-bin
- python3-pip
- udhcpc
name:
- sqlite3
- python3
- python3-setuptools
- python3-yaml
- python3-mako
- python3-gi
- python3-watchdog
- python3-numpy
- python3-websocket
- ofono
- patchelf
- libcap2-bin
- python3-pip
- udhcpc
tags:
- osmo-gsm-tester-main
- name: install gsm tester dependencies (proc)
apt:
name: "{{ item }}"
with_items:
- tcpdump
- patchelf
- libcap2-bin
- iperf3
- sudo
name:
- tcpdump
- patchelf
- libcap2-bin
- iperf3
- sudo
tags:
- osmo-gsm-tester-proc

View File

@ -1,9 +1,8 @@
---
- name: install coverity-required debian packages
apt:
name: "{{ item }}"
with_items:
- curl
name:
- curl
- name: copy coverity installer
copy:

View File

@ -1,12 +1,11 @@
---
- name: install bzip2 and tar
apt:
name: "{{ item }}"
name:
- tar
- bzip2
cache_valid_time: 3600
update_cache: yes
with_items:
- tar
- bzip2
- name: copy poky installer
copy:

View File

@ -2,19 +2,18 @@
- name: install jenkins utilities
apt:
name: "{{ item }}"
name:
- htop
- virt-manager
- qemu
- qemu-user-static
- qemu-system-arm
- proot
- debootstrap
- fakeroot
cache_valid_time: 3600
update_cache: yes
install_recommends: no
with_items:
- htop
- virt-manager
- qemu
- qemu-user-static
- qemu-system-arm
- proot
- debootstrap
- fakeroot
when: install_jenkins_utilities
- name: stop checking release validity for old stable
@ -41,20 +40,18 @@
- name: install java for stretch
apt:
name: "{{ item }}"
name:
- openjdk-8-jre-headless
cache_valid_time: 3600
update_cache: yes
install_recommends: no
with_items:
- openjdk-8-jre-headless
when: ansible_distribution == 'Debian' and ansible_distribution_version == '9'
- name: install java for buster and later
apt:
name: "{{ item }}"
name:
- openjdk-11-jre-headless
cache_valid_time: 3600
update_cache: yes
install_recommends: no
with_items:
- openjdk-11-jre-headless
when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 10

View File

@ -1,103 +1,101 @@
---
- name: install build utilities
apt:
name: "{{ item }}"
name:
- asciidoc
- autoconf
- autoconf-archive
- automake
- bc
- bison
- coccinelle
- cppcheck
- debhelper
- devscripts
- dh-autoreconf
- dh-systemd
- doxygen
- flex
- g++
- gawk
- gcc
- gcc-arm-none-eabi
- git
- git-buildpackage
- graphviz
- libcsv-dev
- libtool
- libboost-all-dev
- make
- mscgen
- osc
- pkgconf
- python-minimal
- python-setuptools
- python3
- python3-setuptools
- stow
- texinfo
# by gsm-manuals
- python3-nwdiag
- python-pychart
- inkscape
# by gapk
- libasound-dev
- libopencore-amrnb-dev
# by LimeSuite
- cmake
- patchelf
# by libusrp
- sdcc
# by mingw upload job
- rsync
cache_valid_time: 3600
update_cache: yes
with_items:
- asciidoc
- autoconf
- autoconf-archive
- automake
- bc
- bison
- coccinelle
- cppcheck
- debhelper
- devscripts
- dh-autoreconf
- dh-systemd
- doxygen
- flex
- g++
- gawk
- gcc
- gcc-arm-none-eabi
- git
- git-buildpackage
- graphviz
- libcsv-dev
- libtool
- libboost-all-dev
- make
- mscgen
- osc
- pkgconf
- python-minimal
- python-setuptools
- python3
- python3-setuptools
- stow
- texinfo
# by gsm-manuals
- python3-nwdiag
- python-pychart
- inkscape
# by gapk
- libasound-dev
- libopencore-amrnb-dev
# by LimeSuite
- cmake
- patchelf
# by libusrp
- sdcc
# by mingw upload job
- rsync
- name: install build dependencies and libraries
apt:
name: "{{ item }}"
name:
- dahdi-source
- docbook5-xml
- libboost-dev
- libc-ares-dev
- libdbd-sqlite3
- libdbi-dev
- libffi-dev
- libffi-dev
- libfftw3-dev
- libgmp-dev
- libgnutls28-dev
- libgps-dev
- libgsm1-dev
- libnl-3-dev
- libnl-route-3-dev
- libmnl-dev
# by osmo-sysmon
- liboping-dev
- libncurses5-dev
- libortp-dev
- libpcap-dev
- libpcsclite-dev
- libreadline-dev
- libsctp-dev
- libsigsegv-dev
- libsnmp-dev
- libsofia-sip-ua-glib-dev
- libsqlite3-dev
- libssl-dev
- libsystemd-dev
- libtalloc-dev
- libuhd-dev
- libusb-1.0-0-dev
- libusb-dev
- libzmq3-dev
- sqlite3
- libaio-dev
cache_valid_time: 3600
update_cache: yes
install_recommends: no
with_items:
- dahdi-source
- docbook5-xml
- libboost-dev
- libc-ares-dev
- libdbd-sqlite3
- libdbi-dev
- libffi-dev
- libffi-dev
- libfftw3-dev
- libgmp-dev
- libgnutls28-dev
- libgps-dev
- libgsm1-dev
- libnl-3-dev
- libnl-route-3-dev
- libmnl-dev
# by osmo-sysmon
- liboping-dev
- libncurses5-dev
- libortp-dev
- libpcap-dev
- libpcsclite-dev
- libreadline-dev
- libsctp-dev
- libsigsegv-dev
- libsnmp-dev
- libsofia-sip-ua-glib-dev
- libsqlite3-dev
- libssl-dev
- libsystemd-dev
- libtalloc-dev
- libuhd-dev
- libusb-1.0-0-dev
- libusb-dev
- libzmq3-dev
- sqlite3
- libaio-dev
- name: install liblua for jessie
apt:
@ -110,65 +108,60 @@
- name: install liblua for stretch or later
apt:
name: "{{ item }}"
name:
- liblua5.3-dev
cache_valid_time: 3600
update_cache: yes
install_recommends: no
with_items:
- liblua5.3-dev
when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9
- name: install liblimesuite-dev for stretch or later
apt:
name: "{{ item }}"
name:
- liblimesuite-dev
cache_valid_time: 3600
update_cache: yes
install_recommends: no
with_items:
- liblimesuite-dev
when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9
- name: install osmo-remsim dependencies
apt:
name: "{{ item }}"
name:
- libjansson-dev
- libulfius-dev
cache_valid_time: 3600
update_cache: yes
with_items:
- libjansson-dev
- libulfius-dev
when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9
- name: install srsLTE build dependencies
apt:
name: "{{ item }}"
name:
- cmake
- libfftw3-dev
- libmbedtls-dev
- libboost-program-options-dev
- libconfig++-dev
- libsctp-dev
- libpcsclite-dev
- libuhd-dev
- libczmq-dev
- libsoapysdr-dev
cache_valid_time: 3600
update_cache: yes
with_items:
- cmake
- libfftw3-dev
- libmbedtls-dev
- libboost-program-options-dev
- libconfig++-dev
- libsctp-dev
- libpcsclite-dev
- libuhd-dev
- libczmq-dev
- libsoapysdr-dev
when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9
- name: install open5gs build dependencies
apt:
name: "{{ item }}"
name:
- meson
- ninja-build
- libgcrypt-dev
- libidn11-dev
- libmongoc-dev
- libbson-dev
- libyaml-dev
cache_valid_time: 3600
update_cache: yes
with_items:
- meson
- ninja-build
- libgcrypt-dev
- libidn11-dev
- libmongoc-dev
- libbson-dev
- libyaml-dev
when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 10
- name: download osmo-python-tests for py2

View File

@ -14,35 +14,34 @@
- name: install distribution packages
apt:
name: "{{ item }}"
name:
- iceweasel
- vim
- evince
- valgrind
- gdb
- libc6-dbg
- wireshark
- tcpdump
- ccache
- gnupg
- openssh-client
- openssh-server
- console-common
- console-data
- meld
- emacs
- gitk
- okular
- libreoffice-calc
- libreoffice-draw
- libreoffice-impress
- libreoffice-writer
- gnumeric
- openvpn
- fvwm
- xfce4
- network-manager
- modemmanager
cache_valid_time: 3600
update_cache: yes
with_items:
- iceweasel
- vim
- evince
- valgrind
- gdb
- libc6-dbg
- wireshark
- tcpdump
- ccache
- gnupg
- openssh-client
- openssh-server
- console-common
- console-data
- meld
- emacs
- gitk
- okular
- libreoffice-calc
- libreoffice-draw
- libreoffice-impress
- libreoffice-writer
- gnumeric
- openvpn
- fvwm
- xfce4
- network-manager
- modemmanager

View File

@ -5,16 +5,15 @@
tasks:
- name: install common utilities
apt:
name: "{{ item }}"
name:
- vim
- tmux
- screen
- ca-certificates
- wget
- curl
cache_valid_time: 3600
update_cache: yes
with_items:
- vim
- tmux
- screen
- ca-certificates
- wget
- curl
roles:
- name: gsm-tester
tags:

View File

@ -7,14 +7,13 @@
tasks:
- name: install common utilities
apt:
name: "{{ item }}"
name:
- vim
- tmux
- screen
- ca-certificates
cache_valid_time: 3600
update_cache: yes
with_items:
- vim
- tmux
- screen
- ca-certificates
roles:
- name: docker
jenkins_user: osmocom-build

View File

@ -10,17 +10,16 @@
- name: install common utilities
apt:
name: "{{ item }}"
name:
- vim
- ca-certificates
- python3-minimal
- python3-setuptools
- python3-pip
- python3-serial
- python3-pyscard
- virtualenv
install_recommends: no
with_items:
- vim
- ca-certificates
- python3-minimal
- python3-setuptools
- python3-pip
- python3-serial
- python3-pyscard
- virtualenv
roles:
- name: osmocom-jenkins-slave