django_manage: rely on package idempotency to install virtualenv (#8644)

* rely on package idempotency to install virtualenv

* improve os package name logic in integration tests

* add os families debian, redhat

* add os families archlinux

* fix pkg name in archlinux

* improvement from PR

* typo

* Update tests/integration/targets/setup_os_pkg_name/tasks/debian.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update tests/integration/targets/setup_os_pkg_name/tasks/redhat.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2024-08-10 18:19:58 +12:00 committed by GitHub
commit 9f340861ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 93 additions and 9 deletions

View file

@ -9,17 +9,10 @@
suffix: .django_manage
register: tmp_django_root
- name: Install virtualenv on CentOS 8
- name: Install virtualenv
package:
name: virtualenv
name: "{{ os_package_name.virtualenv }}"
state: present
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '8'
- name: Install virtualenv on Arch Linux
pip:
name: virtualenv
state: present
when: ansible_os_family == 'Archlinux'
- name: Install required library
pip: