validations-common/validations_common/roles/check_latest_packages_version/molecule/default/prepare.yml

61 lines
1.7 KiB
YAML

---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Prepare
hosts: all
gather_facts: false
tasks:
- name: Create /opt/valfrwk directory
file:
path: '/opt/valfrwk'
state: directory
mode: "0777"
- name: Copy valfrwk-release packages
copy:
src: "{{ item }}"
dest: /opt/valfrwk
with_items:
- ./valfrwk-release-1.0.0-1.20210331045404.4c29590.el8.x86_64.rpm
- ./valfrwk-release-1.0.0-2.20210401064344.c8ee186.el8.x86_64.rpm
- ./valfrwk-release-1.0.1-1.20210401074356.drh345o.el8.x86_64.rpm
- name: Install createrepo rpm
package:
name: createrepo
state: present
- name: Generate yum repo
command: >-
createrepo /opt/valfrwk/
args:
warn: false
- name: Add valfrwk yum repository
yum_repository:
name: valfrwk
description: Validations Framework Repo
file: valfrwk
baseurl: file:///opt/valfrwk
gpgcheck: false
- name: Install the oldest valfrwk-release rpm
package:
name: valfrwk-release-1.0.0-1.20210331045404.4c29590.el8
state: present