ci: linter, workflows, galaxy, molecule

This commit is contained in:
Guido Grazioli 2022-09-19 15:41:12 +02:00
commit 9b2ea35184
No known key found for this signature in database
GPG key ID: 22C8C31EF2BC093B
7 changed files with 69 additions and 16 deletions

View file

@ -8,3 +8,13 @@
- sudo
- java-1.8.0-openjdk
state: present
- name: Prepare
hosts: all
tasks:
- name: "Run preparation common to all scenario"
ansible.builtin.include_tasks: ../prepare.yml
vars:
assets:
- "{{ assets_server }}/sso/7.5.0/rh-sso-7.5.0-server-dist.zip"
- "{{ assets_server }}/sso/7.5.1/rh-sso-7.5.1-patch.zip"

View file

@ -2,11 +2,8 @@
- name: Prepare
hosts: all
tasks:
- name: Disable beta repos
ansible.builtin.command: yum config-manager --disable '*beta*'
ignore_errors: yes
- name: Install sudo
ansible.builtin.yum:
name: sudo
state: present
- name: "Run preparation common to all scenario"
ansible.builtin.include_tasks: ../prepare.yml
vars:
assets:
- "{{ assets_server }}/sso/7.5.0/rh-sso-7.5.0-server-dist.zip"

28
molecule/prepare.yml Normal file
View file

@ -0,0 +1,28 @@
---
- name: Display Ansible version
ansible.builtin.debug:
msg: "Ansible version is {{ ansible_version.full }}"
- name: Install sudo
ansible.builtin.yum:
name:
- sudo
- iproute
state: present
- name: "Retrieve assets server from env"
ansible.builtin.set_fact:
assets_server: "{{ lookup('env','MIDDLEWARE_DOWNLOAD_RELEASE_SERVER_URL') }}"
- name: "Download and deploy jws zips from {{ assets_server }}"
ansible.builtin.get_url:
url: "{{ asset }}"
dest: "{{ lookup('env', 'PWD') }}"
validate_certs: no
delegate_to: localhost
loop: "{{ assets }}"
loop_control:
loop_var: asset
when:
- assets_server is defined
- assets_server | length > 0