summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/setup_paramiko/install.yml
blob: 1868987dd063d597eff116260fb35aaeb03f1185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
- hosts: localhost
  tasks:
    - name: Detect Paramiko
      detect_paramiko:
      register: detect_paramiko
    - name: Persist Result
      copy:
        content: "{{ detect_paramiko }}"
        dest: "{{ lookup('env', 'OUTPUT_DIR') }}/detect-paramiko.json"
    - name: Install Paramiko
      when: not detect_paramiko.found
      include_tasks: "{{ item }}"
      with_first_found:
        - "install-{{ ansible_distribution }}-{{ ansible_distribution_version }}-python-{{ ansible_python.version.major }}.yml"
        - "install-{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-python-{{ ansible_python.version.major }}.yml"
        - "install-{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-python-{{ ansible_python.version.major }}.yml"
        - "install-{{ ansible_os_family }}-python-{{ ansible_python.version.major }}.yml"
        - "install-python-{{ ansible_python.version.major }}.yml"
        - "install-fail.yml"