This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%global srcname ara | |
Name: %{srcname} | |
Version: 1.3.2 | |
Release: 1%{?dist} | |
Summary: ARA Records Ansible playbooks and makes them easier to understand and troubleshoot | |
License: GPLv3 | |
URL: https://github.com/ansible-community/ara | |
Source0: https://pypi.io/packages/source/a/%{srcname}/%{srcname}-%{version}.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
# Import the client | |
from ara.clients.http import AraHttpClient | |
# Instanciate the HTTP client with an endpoint where an API server is listening | |
client = AraHttpClient(endpoint="https://api.demo.recordsansible.org") | |
print(json.dumps(client.get("/api/v1/playbooks"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import re | |
from urllib import parse as urlparse | |
import requests | |
def _image_tag_from_url(image_url): | |
if '@' in image_url.path: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0001-run-tests-with-ara.patch | |
[root@bastion ansible]# cat 0001-run-tests-with-ara.patch | |
From af24cfe08bc33a2a63fd2ccc6736f35fd22cdc59 Mon Sep 17 00:00:00 2001 | |
From: root <root@bastion.novalocal> | |
Date: Fri, 31 May 2019 12:39:49 +0000 | |
Subject: [PATCH] run tests with ara | |
--- | |
test/integration/integration.cfg | 5 +++++ | |
test/integration/targets/ping/tasks/main.yml | 12 ++++++++++++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
gather_facts: yes | |
vars_files: | |
- devstack_gate_vars.yaml | |
pre_tasks: | |
# Note (dmsimard) | |
# If some swap is already set up, the amount is not 100% accurate | |
# (ex: 8191MB swap for a 8192MB file) | |
- name: Configure swap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ara<1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Copyright 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Would create the label if it doesn't exist | |
# Description is optional but can be provided | |
# Appends the label to playbook.labels for state.present | |
# Removes the label from playbook.labels for state.absent | |
- name: Label this playbook | |
ara_playbook_label: | |
name: "{{ item }}" | |
state: present | |
loop: | |
- pre-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Get playbooks | |
ara_api: | |
# This doesn't actually need to be specified, the module can pick it up from the callback config | |
# https://github.com/openstack/ara-plugins/blob/49ce188ab88a6948db651163b9cd7973117fa2b1/ara/plugins/action/ara_record.py#L143-L153 | |
# api_server: https://api.demo.recordsansible.org | |
action: get | |
endpoint: /api/v1/playbooks | |
filter: | |
status: failed | |
register: failed_playbooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum -y install centos-release-openshift-origin epel-release | |
yum -y install wget git net-tools bind-utils iptables-services bridge-utils bash-completion origin-clients docker ansible htop | |
sed -i '/OPTIONS=.*/c\OPTIONS="--selinux-enabled --insecure-registry 172.30.0.0/16"' /etc/sysconfig/docker | |
# Fix shenanigans between subscription-manager-rhsm-certificates and python-rhsm-certificates: | |
# - https://github.com/openshift/openshift-ansible/issues/6222 | |
# - https://github.com/minishift/minishift/issues/2194 | |
# - https://github.com/minishift/minishift-centos-iso/issues/251 | |
# - https://github.com/openshift/os/issues/179 |