Skip to content

Commit ad052c1

Browse files
committed
ci: update prod scenario
1 parent 069f4e6 commit ad052c1

File tree

1 file changed

+33
-40
lines changed

1 file changed

+33
-40
lines changed

molecule/prod_eap/converge.yml

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,42 @@
22
- name: Converge
33
hosts: localhost
44
gather_facts: no
5-
vars:
6-
client_id: "{{ lookup('env', 'PROD_JBOSSNETWORK_API_CLIENTID') }}"
7-
client_secret: "{{ lookup('env', 'PROD_JBOSSNETWORK_API_SECRET') }}"
85
tasks:
9-
- name: Execute scenario if staging credentials are provided
10-
when:
11-
- client_id is defined and client_password is defined
12-
block:
13-
- name: "Ensures required secret are provided."
14-
ansible.builtin.assert:
15-
that:
16-
- client_id is defined and client_id | length > 0
17-
- client_secret is defined and client_secret | length > 0
18-
fail_msg: "Missing required env vars PROD_JBOSSNETWORK_API_CLIENTID and/or PROD_JBOSSNETWORK_API_SECRET"
6+
- name: "Ensures required secret are provided."
7+
ansible.builtin.assert:
8+
that:
9+
- client_id is defined and client_id | length > 0
10+
- client_secret is defined and client_secret | length > 0
11+
fail_msg: "Missing required env vars PROD_JBOSSNETWORK_API_CLIENTID and/or PROD_JBOSSNETWORK_API_SECRET"
1912

20-
- name: Search EAP Product
21-
middleware_automation.common.product_search:
22-
client_id: "{{ client_id }}"
23-
client_secret: "{{ client_secret }}"
24-
product_type: DISTRIBUTION
25-
product_version: '7.4'
26-
product_category: appplatform
27-
register: rhn_products
28-
no_log: false
13+
- name: Search EAP Product
14+
middleware_automation.common.product_search:
15+
client_id: "{{ lookup('env', 'PROD_JBOSSNETWORK_API_CLIENTID') }}"
16+
client_secret: "{{ lookup('env', 'PROD_JBOSSNETWORK_API_SECRET') }}"
17+
product_type: DISTRIBUTION
18+
product_version: '7.4'
19+
product_category: appplatform
20+
register: rhn_products
21+
no_log: false
2922

30-
- name: Search install zipfile
31-
ansible.builtin.set_fact:
32-
rhn_filtered_products: "{{ rhn_products.results | selectattr('file_path', 'match', '[^/]*/jboss-eap-7.4.0.zip$') }}"
23+
- name: Search install zipfile
24+
ansible.builtin.set_fact:
25+
rhn_filtered_products: "{{ rhn_products.results | selectattr('file_path', 'match', '[^/]*/jboss-eap-7.4.0.zip$') }}"
3326

34-
- name: Retrieve product download using JBossNetwork API
35-
middleware_automation.common.product_search:
36-
client_id: "{{ client_id }}"
37-
client_secret: "{{ client_secret }}"
38-
product_type: BUGFIX
39-
product_version: '7.4'
40-
product_category: appplatform
41-
register: rhn_products
42-
no_log: true
27+
- name: Retrieve product download using JBossNetwork API
28+
middleware_automation.common.product_search:
29+
client_id: "{{ client_id }}"
30+
client_secret: "{{ client_secret }}"
31+
product_type: BUGFIX
32+
product_version: '7.4'
33+
product_category: appplatform
34+
register: rhn_products
35+
no_log: true
4336

44-
- name: Determine patch versions list
45-
ansible.builtin.set_fact:
46-
filtered_versions: "{{ rhn_products.results | map(attribute='file_path') | select('match', '^[^/]*/jboss-eap-.*[0-9]*[.][0-9]*[.][0-9]*.*$') | map('regex_replace','[^/]*/jboss-eap-([0-9]*[.][0-9]*[.][0-9]*)-.*','\\1' ) | list | unique }}"
37+
- name: Determine patch versions list
38+
ansible.builtin.set_fact:
39+
filtered_versions: "{{ rhn_products.results | map(attribute='file_path') | select('match', '^[^/]*/jboss-eap-.*[0-9]*[.][0-9]*[.][0-9]*.*$') | map('regex_replace','[^/]*/jboss-eap-([0-9]*[.][0-9]*[.][0-9]*)-.*','\\1' ) | list | unique }}"
4740

48-
- name: Determine latest version
49-
ansible.builtin.debug:
50-
msg: "JBoss EAP 7.4 most recent CP is version {{ filtered_versions | middleware_automation.common.version_sort | last }}"
41+
- name: Determine latest version
42+
ansible.builtin.debug:
43+
msg: "JBoss EAP 7.4 most recent CP is version {{ filtered_versions | middleware_automation.common.version_sort | last }}"

0 commit comments

Comments
 (0)