Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/setup_java_keytool/tasks/main.yml

raw
1 ---
2 ####################################################################
3 # WARNING: These are designed specifically for Ansible tests #
4 # and should not be used as examples of how to write Ansible roles #
5 ####################################################################
6
7 # Copyright (c) Ansible Project
8 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
9 # SPDX-License-Identifier: GPL-3.0-or-later
10
11 - set_fact:
12 has_java_keytool: >
13 {{ ansible_facts.os_family not in ['Darwin', 'FreeBSD'] }}
14
15 - name: Include OS-specific variables
16 include_vars: '{{ lookup("first_found", params) }}'
17 vars:
18 params:
19 files:
20 - '{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_version }}.yml'
21 - '{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml'
22 - '{{ ansible_facts.distribution }}.yml'
23 - '{{ ansible_facts.os_family }}.yml'
24 paths:
25 - '{{ role_path }}/vars'
26 when: has_java_keytool
27
28 - name: Install keytool
29 package:
30 name: '{{ keytool_package_names }}'
31 become: true
32 when: has_java_keytool