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
mysql -e "CREATE DATABASE ara;" | |
mysql -e "CREATE USER ara@localhost IDENTIFIED BY 'password';" | |
mysql -e "GRANT ALL PRIVILEGES ON ara.* TO ara@localhost;" | |
mysql -e "FLUSH PRIVILEGES;" | |
yum -y install mariadb-server | |
systemctl enable --now mariadb-server | |
systemctl enable --now mariadb |
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
# Pseudocode | |
- name: Return job status to Github | |
github_comment: | |
org: "{{ org }}" # openstack-infra | |
repo: "{{ repo }}" # zuul | |
pr: "{{ pr }}" # 1234 | |
# Maybe jobs could supply their own comments or comment templates | |
comment: "{{ comment_defined_by_the_job | default('default_job_comment.j2') }}" | |
# +1, -2, etc | |
vote: "{{ vote | default(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
- name: first play | |
hosts: localhost | |
tasks: | |
- debug: | |
msg: foo | |
- name: second play | |
hosts: localhost | |
tasks: | |
- debug: |
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: Start a new AWS with ansible enabled | |
hosts: workers | |
become: true | |
become_method: sudo | |
vars: | |
root_password: vptbemsq$ | |
tasks: | |
- name: create sudo user | |
password: "{{ root_password }}" | |
- name: create ansadmin |
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
[defaults] | |
... | |
# I'd like [foo] to be available to both the callback and an action plugin so I don't need to do: | |
# - name: Run action plugin | |
# action: | |
# server: http://api | |
# do: something | |
# | |
# and instead do: |
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 mariadb-server | |
systemctl enable --now mariadb | |
mysql -e "CREATE DATABASE ara;" | |
mysql -e "CREATE USER ara@localhost IDENTIFIED BY 'password';" | |
mysql -e "GRANT ALL PRIVILEGES ON ara.* TO ara@localhost;" | |
mysql -e "FLUSH PRIVILEGES;" | |
virtualenv ara | |
. ara/bin/activate | |
pip install ara |
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: Do something if there are 25 changed tasks across the entire playbook | |
async: 45 | |
poll: 5 | |
debug: | |
msg: do something | |
# My brain can't memorize how to write jinja conditions properly, please accept pseudocode | |
# The "ara" var would probably be automatically populated and kept up to date by the callback. | |
# "ara.playbook" would be a variable referencing the current playbook id running in ARA | |
# Not sure what's the simplest way of querying ARA yet. | |
when: {{ lookup('ara', playbook=ara.playbook, status='changed') }} > 25 |
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
{ | |
"links": [ | |
{ | |
"ethernet_mac_address": "fa:16:3e:ed:9a:59", | |
"id": "tap1a81968a-79", | |
"mtu": null, | |
"type": "bridge", | |
"vif_id": "1a81968a-797a-400f-8a80-567f997eb93f" | |
} | |
], |
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
/** | |
Copyright Sinopé Technologies | |
SVN-311 | |
**/ | |
preferences { | |
// input("zipcode", "text", title: "ZipCode for setting outdoor Temp", description: "by default,use current hub location") | |
input("trace", "bool", title: "trace", description: | |
"Set it to true to enable tracing or leave it empty (no tracing)") | |
input("logFilter", "number",title: "(1=ERROR only,2=<1+WARNING>,3=<2+INFO>,4=<3+DEBUG>,5=<4+TRACE>)", range: "1..5", |