-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathinstall-rpm.yml
More file actions
41 lines (41 loc) · 1.05 KB
/
install-rpm.yml
File metadata and controls
41 lines (41 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
- package:
name:
- fontconfig
state: present
update_cache: true
- package:
name:
- java-21-openjdk
state: present
when: ansible_distribution != 'Amazon' and (ansible_distribution != 'CentOS' or ansible_distribution_major_version != '10')
- package:
name:
- java-21-amazon-corretto
state: present
when: ansible_distribution == 'Amazon'
- package:
name:
- java-21-openjdk
state: present
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '10'
- file:
path: /var/tmp/target/credentials
state: directory
- copy:
src: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/credentials/test.ascii.key"
dest: /var/tmp/target/credentials/test.ascii.key
- rpm_key:
state: present
key: /var/tmp/target/credentials/test.ascii.key
- find:
paths: /var/tmp/target/rpm
file_type: file
patterns: "*.rpm"
register: package_list
- assert:
that:
- package_list.matched == 1
- package:
name: "{{ package_list.files[0].path }}"
state: present