1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Make sure mercurial is also installed on OpenSuSE. (#1734)

This commit is contained in:
Felix Fontein 2021-02-05 08:08:06 +01:00 committed by GitHub
parent dd0b54b9b5
commit 701a89eb1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -36,6 +36,11 @@
name: mercurial name: mercurial
when: ansible_facts.pkg_mgr in ['pkgng', 'community.general.pkgng'] when: ansible_facts.pkg_mgr in ['pkgng', 'community.general.pkgng']
- name: install mercurial (zypper)
package:
name: mercurial
when: ansible_facts.pkg_mgr in ['zypper', 'community.general.zypper']
- name: preserve the updated python - name: preserve the updated python
command: cp -av "{{ which_python.stdout }}" "{{ which_python.stdout }}.updated" command: cp -av "{{ which_python.stdout }}" "{{ which_python.stdout }}.updated"

View file

@ -35,6 +35,12 @@
autoremove: yes autoremove: yes
when: ansible_facts.pkg_mgr in ['pkgng', 'community.general.pkgng'] when: ansible_facts.pkg_mgr in ['pkgng', 'community.general.pkgng']
- name: uninstall packages which were not originally installed (zypper)
package:
name: mercurial
state: absent
when: ansible_facts.pkg_mgr in ['zypper', 'community.general.zypper']
- name: restore the default python - name: restore the default python
raw: mv "{{ which_python.stdout }}.default" "{{ which_python.stdout }}" raw: mv "{{ which_python.stdout }}.default" "{{ which_python.stdout }}"