parent
bb441fc253
commit
f148f69432
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
- name: Converge
|
||||||
|
hosts: all
|
||||||
|
gather_facts: true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Test koji_tools role
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: msvsphere.ci.koji_tools
|
||||||
|
rolespec_validate: true
|
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
driver:
|
||||||
|
name: vagrant
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- name: msvsphere-9
|
||||||
|
box: msvsphere/9
|
||||||
|
memory: 1024
|
||||||
|
cpus: 1
|
@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
|
||||||
|
vars:
|
||||||
|
repo_path: /usr/local/koji-tools
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- include_tasks: ../resources/tests/common/tasks/package_installed.yml
|
||||||
|
vars:
|
||||||
|
package_name: "{{ item }}"
|
||||||
|
with_items:
|
||||||
|
- git
|
||||||
|
- python3-cryptography
|
||||||
|
|
||||||
|
- name: Collect koji-tools repository directory stats
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "{{ repo_path }}"
|
||||||
|
register: repo_path_stats
|
||||||
|
|
||||||
|
- name: Verify koji-tools repository directory stats
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that: |
|
||||||
|
repo_path_stats.stat.exists and
|
||||||
|
repo_path_stats.stat.mode == '0755' and
|
||||||
|
repo_path_stats.stat.pw_name == 'root' and
|
||||||
|
repo_path_stats.stat.gr_name == 'root'
|
||||||
|
|
||||||
|
- name: Get koji-tools git commit hash
|
||||||
|
ansible.builtin.command: "git -C {{ repo_path }} log --format='%H' -n 1"
|
||||||
|
register: git_log
|
||||||
|
|
||||||
|
- name: Verify koji-tools git commit hash
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that: |
|
||||||
|
git_log.stdout == '2b8a094bb5d3dfbdcb768f9ffc02c1247ae99e38'
|
||||||
|
fail_msg: koji-tools git commit hash does not match expected 2b8a094bb5d3dfbdcb768f9ffc02c1247ae99e38
|
||||||
|
success_msg: koji-tools git commit hash matches expected 2b8a094bb5d3dfbdcb768f9ffc02c1247ae99e38
|
||||||
|
|
||||||
|
- name: Execute koji-ssl-admin
|
||||||
|
ansible.builtin.command: "{{ (repo_path, 'src/bin/koji-ssl-admin' ) | path_join }} -h"
|
||||||
|
register: koji_ssl_admin_status
|
||||||
|
|
||||||
|
- name: Check koji-ssl-admin exit code
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that: |
|
||||||
|
koji_ssl_admin_status.rc == 0
|
@ -0,0 +1,17 @@
|
|||||||
|
# msvsphere.ci.koji_tools
|
||||||
|
|
||||||
|
An Ansible role that installs [koji-tools](https://pagure.io/koji-tools).
|
||||||
|
|
||||||
|
## Variables
|
||||||
|
|
||||||
|
| Variable | Default value | Type | Description | Required |
|
||||||
|
| -------- | ------------- | ---- |----------- | -------- |
|
||||||
|
| koji_tools_git_ref | "2b8a094bb5d3dfbdcb768f9ffc02c1247ae99e38" | string | koji-tools git repository reference | no |
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT.
|
||||||
|
|
||||||
|
## Authors
|
||||||
|
|
||||||
|
* [Eugene Zamriy](mailto:ezamriy@msvsphere-os.ru)
|
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
koji_tools_git_ref: '2b8a094bb5d3dfbdcb768f9ffc02c1247ae99e38'
|
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
argument_specs:
|
||||||
|
main:
|
||||||
|
short_description: A role that installs koji-tools.
|
||||||
|
author: Eugene Zamriy
|
||||||
|
version_added: '0.1.1'
|
||||||
|
options:
|
||||||
|
koji_tools_git_ref:
|
||||||
|
description: koji-tools git repository reference.
|
||||||
|
default: '2b8a094bb5d3dfbdcb768f9ffc02c1247ae99e38'
|
||||||
|
type: 'str'
|
||||||
|
required: false
|
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
galaxy_info:
|
||||||
|
author: Eugene Zamriy
|
||||||
|
description: An Ansible role that installs koji-tools.
|
||||||
|
company: Softline PJSC
|
||||||
|
license: MIT
|
||||||
|
min_ansible_version: 2.13
|
||||||
|
platforms:
|
||||||
|
- name: EL
|
||||||
|
versions:
|
||||||
|
- "9"
|
||||||
|
galaxy_tags:
|
||||||
|
- koji
|
||||||
|
|
||||||
|
dependencies: []
|
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- name: Install dependencies
|
||||||
|
ansible.builtin.dnf:
|
||||||
|
name:
|
||||||
|
- git
|
||||||
|
- python3-cryptography
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Clone koji-tools git repository
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: 'https://pagure.io/koji-tools.git'
|
||||||
|
dest: /usr/local/koji-tools
|
||||||
|
version: "{{ koji_tools_git_ref }}"
|
Loading…
Reference in new issue