ansible/test/integration/targets/setup_paramiko/uninstall.yml
Rick Elrod 11b7091c84 fix paramiko deps for freebsd/12.2
Signed-off-by: Rick Elrod <rick@elrod.me>
2020-11-09 12:09:53 -06:00

20 lines
1.1 KiB
YAML

- hosts: localhost
vars:
detect_paramiko: '{{ lookup("file", lookup("env", "OUTPUT_DIR") + "/detect-paramiko.json") | from_json }}'
tasks:
- name: Uninstall Paramiko and Verify Results
when: not detect_paramiko.found
block:
- name: Uninstall Paramiko
include_tasks: "{{ item }}"
with_first_found:
- "uninstall-{{ ansible_distribution }}-{{ ansible_distribution_version }}-python-{{ ansible_python.version.major }}.yml"
- "uninstall-{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-python-{{ ansible_python.version.major }}.yml"
- "uninstall-{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-python-{{ ansible_python.version.major }}.yml"
- "uninstall-{{ ansible_pkg_mgr }}-python-{{ ansible_python.version.major }}.yml"
- "uninstall-{{ ansible_pkg_mgr }}.yml"
- "uninstall-fail.yml"
- name: Verify Paramiko was uninstalled
detect_paramiko:
register: detect_paramiko
failed_when: detect_paramiko.found