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 yum-plugin-priorities | |
# Add Mitaka release equivalent repositories | |
curl https://dmsimard.com/rdo-mitaka-deps.repo |tee /etc/yum.repos.d/rdo-mitaka-deps.repo | |
curl https://dmsimard.com/rdo-mitaka-release.repo |tee /etc/yum.repos.d/rdo-mitaka-release.repo | |
yum -y install puppet \ | |
iproute \ | |
dstat \ |
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 | |
import yaml | |
# Copy/paste from projects.yaml but only after the dist-git update part | |
with open('projects.yaml', 'r') as f: | |
text=f.read() | |
def template(template): | |
print " template:" | |
print " - name: {0}".format(template) |
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 | |
# Adds the rdo-core group to a list of projects | |
GIT_BASE_URL="ssh://admin@review.rdoproject.org:29418" | |
BASE_DIR="/tmp/sfaccess" | |
PROJECT_FILE="/tmp/projects" | |
export GIT_COMMITTER_NAME="SF initial configurator" | |
export GIT_COMMITTER_EMAIL="admin@review.rdoproject.org" | |
export GIT_AUTHOR_NAME="SF initial configurator" | |
export GIT_AUTHOR_EMAIL="admin@review.rdoproject.org" |
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
tasks = (models.Task.query | |
.join(models.Play) | |
.join(models.Playbook) | |
.filter(models.Task.playbook_id == models.Playbook.id) | |
.filter(models.Task.play_id == models.Play.id)) | |
for task in tasks: | |
print(task.playbook_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
def take_action(self, parsed_args): | |
tasks = (models.Task.query | |
.join(models.Play) | |
.join(models.Playbook) | |
.filter(models.Task.playbook_id == models.Playbook.id) | |
.filter(models.Task.play_id == models.Play.id)) | |
return (('ID', 'Name', 'Path', 'Playbook', 'Play', 'Action', 'Line', 'Handler', 'Time Start', 'Time End'), | |
[(task.id, | |
task.name, |
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
{% macro display_result(result, hdr) %} | |
{% if result is mapping %} | |
{% if 'item' in result %} | |
<{{hdr}}>Item</{{hdr}}> | |
<pre>{{result.item|to_nice_json}}</pre> | |
{% endif %} | |
{% for attr in result.keys()|sort | |
if attr not in ['item', 'changed', 'stdout_lines'] %} |
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
[root@n12 ~]# openstack server list | |
+--------------------------------------+-------------+--------+---------------------------------------------+ | |
| ID | Name | Status | Networks | | |
+--------------------------------------+-------------+--------+---------------------------------------------+ | |
| 08717da2-6d8f-4879-909a-e15da1834284 | test-server | ACTIVE | publicnet=172.19.1.35; othernet=192.168.0.5 | | |
+--------------------------------------+-------------+--------+---------------------------------------------+ | |
[root@n12 ~]# openstack network list | |
+--------------------------------------+-----------+--------------------------------------+ | |
| ID | Name | Subnets | | |
+--------------------------------------+-----------+--------------------------------------+ |
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
for node in $(cico inventory 2>&1 |tail -n+5 |awk {'print $6'} |sort |tail -n+3) | |
do | |
if ssh $node "ls -al /etc/ansible/facts.d >/dev/null" &>/dev/null; then | |
cico inventory 2>&1 |grep " ${node} " | |
fi | |
done |
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
@app.template_filter('pathtruncate') | |
def jinja_pathtruncate(path): | |
'''Truncates a path to less than ARA_PATH_MAX characters. | |
We prepend an ellipsis when we return a truncated path.''' | |
if path is None: | |
return | |
if len(path) < app.config['ARA_PATH_MAX']: | |
return 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
self = <test_cli.TestCLI testMethod=test_playbook_list_complete> | |
def test_playbook_list_complete(self): | |
ctx = ansible_run() | |
cmd = ara.cli.playbook.PlaybookList(None, None) | |
parser = cmd.get_parser('test') | |
args = parser.parse_args(['--complete']) | |
res = cmd.take_action(args) | |