Skip to content
Snippets Groups Projects
Commit 6532c62c authored by ZijianGuo's avatar ZijianGuo
Browse files

Install a list of packages to speed up package installation


Change-Id: I89313d7c279f95e80c593cf02309c8a9f8e6e318
Signed-off-by: default avatarZijianGuo <guozijn@gmail.com>
parent 0d5ccfef
No related branches found
No related tags found
No related merge requests found
...@@ -45,32 +45,26 @@ ...@@ -45,32 +45,26 @@
- name: Install apt packages - name: Install apt packages
package: package:
name: "{{ item }}" name: "{{ (debian_pkg_install | join(' ')).split() }}"
state: present state: present
become: True become: True
with_items: "{{ debian_pkg_install }}" when: ansible_os_family == 'Debian'
when:
- ansible_os_family == 'Debian'
- item != ""
register: apt_install_result register: apt_install_result
- name: Install deltarpm packages - name: Install deltarpm packages
package: package:
name: "{{ item }}" name: deltarpm
state: present state: present
update_cache: yes update_cache: yes
become: True become: True
with_items:
- deltarpm
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
- name: Install yum packages - name: Install yum packages
package: package:
name: "{{ item }}" name: "{{ (redhat_pkg_install | join(' ')).split() }}"
state: present state: present
update_cache: yes update_cache: yes
become: True become: True
with_items: "{{ redhat_pkg_install }}"
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
register: yum_install_result register: yum_install_result
...@@ -131,20 +125,14 @@ ...@@ -131,20 +125,14 @@
- name: Remove packages - name: Remove packages
package: package:
name: "{{ item }}" name: "{{ (ubuntu_pkg_removals | join(' ')).split() }}"
state: absent state: absent
with_items: "{{ ubuntu_pkg_removals }}"
become: True become: True
when: when: ansible_distribution|lower == "ubuntu"
- ansible_distribution|lower == "ubuntu"
- item != ""
- name: Remove packages - name: Remove packages
package: package:
name: "{{ item }}" name: "{{ (redhat_pkg_removals | join(' ')).split() }}"
state: absent state: absent
with_items: "{{ redhat_pkg_removals }}"
become: True become: True
when: when: ansible_os_family == 'RedHat'
- ansible_os_family == 'RedHat'
- item != ""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment