Merge "Don't use loop to supply multiple items to yum/pip"

This commit is contained in:
Zuul
2019-10-29 17:18:53 +00:00
committed by Gerrit Code Review

View File

@@ -9,10 +9,7 @@
- name: Install dependencies for CentOS - name: Install dependencies for CentOS
yum: yum:
name: "{{ item }}" name:
state: present
become: true
with_items:
- gcc - gcc
- gcc-c++ - gcc-c++
- git - git
@@ -21,14 +18,13 @@
- openssl-devel - openssl-devel
- policycoreutils-python - policycoreutils-python
- python-devel - python-devel
state: present
become: true
when: ansible_distribution_major_version < '8' when: ansible_distribution_major_version < '8'
- name: Install dependencies for RHEL8 - name: Install dependencies for RHEL8
yum: yum:
name: "{{ item }}" name:
state: present
become: true
with_items:
- gcc - gcc
- gcc-c++ - gcc-c++
- git - git
@@ -39,6 +35,8 @@
- python3-devel - python3-devel
- python3-pip - python3-pip
- python3-virtualenv - python3-virtualenv
state: present
become: true
when: ansible_distribution_major_version == '8' when: ansible_distribution_major_version == '8'
- name: Install pip - name: Install pip
@@ -61,11 +59,10 @@
- name: Install virtualenv and setuptools- zuul user - name: Install virtualenv and setuptools- zuul user
pip: pip:
name: "{{ item }}" name:
become: true
with_items:
- virtualenv - virtualenv
- setuptools - setuptools
become: true
when: ansible_user == "zuul" and ansible_distribution_major_version < '8' when: ansible_user == "zuul" and ansible_distribution_major_version < '8'
- name: Determine if browbeat directory exists already - name: Determine if browbeat directory exists already