Skip to content

Instantly share code, notes, and snippets.

David Moreau Simard dmsimard

Block or report user

Report or block dmsimard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dmsimard /
Created Sep 9, 2019
http client test
#!/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="")
import json
import re
from urllib import parse as urlparse
import requests
def _image_tag_from_url(image_url):
if '@' in image_url.path:
dmsimard /
Created Jun 5, 2019
ara with ansible-runner
#!/usr/bin/env python3
# Proof of concept ara with ansible-runner
# Requires
import ansible_runner
import os
from ara.setup import callback_plugins
- name: Test for ansible-runner
View ansible-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 ++++++++++++
#!/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
# Unless required by applicable law or agreed to in writing, software
View ara_playbook_label.yaml
# 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
name: "{{ item }}"
state: present
- pre-run
View ara_api.yaml
- name: Get playbooks
# This doesn't actually need to be specified, the module can pick it up from the callback config
# api_server:
action: get
endpoint: /api/v1/playbooks
status: failed
register: failed_playbooks
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"' /etc/sysconfig/docker
# Fix shenanigans between subscription-manager-rhsm-certificates and python-rhsm-certificates:
# -
# -
# -
# -
mysql -e "CREATE DATABASE ara;"
mysql -e "CREATE USER ara@localhost IDENTIFIED BY 'password';"
mysql -e "GRANT ALL PRIVILEGES ON ara.* TO ara@localhost;"
yum -y install mariadb-server
systemctl enable --now mariadb-server
systemctl enable --now mariadb
You can’t perform that action at this time.