This file contains hidden or 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
skills: | |
- name: st2_opsdroid | |
path: /opt/stackstorm/chatops/opsdroid-skills/st2 | |
config: | |
prefix: '!' |
This file contains hidden or 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
# coding: utf-8 | |
from pony.orm import * | |
from .models import attach_models | |
from .config import db_config_params | |
db = Database() | |
attach_models(db) | |
db.bind(**db_config_params) | |
db.generate_mapping() |
This file contains hidden or 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: a loop that surprised me | |
stat: "{{ item }}" | |
loop: | |
- path: /some/file/path | |
- path: /another/file/path | |
- name: a loop the way I normally do it (maybe not for stat, but for modules with multiple paramaters) | |
stat: | |
path: "{{ item.path }}" | |
loop: |
This file contains hidden or 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
--- | |
ungrouped: | |
hosts: | |
localhost: | |
ansible_connection: local | |
ansible_python_interpreter: /usr/bin/python2 |
This file contains hidden or 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
________________________________________ | |
< TASK [theatro-noc.share_drive : debug] > | |
---------------------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || | |
task path: /home/cognifloyd/p/theatro-ansiblehost/ansible-playbooks.git/roles/theatro-noc.share_drive/tasks/Linux.yaml:35 |
This file contains hidden or 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
$ time (git clone [email protected]:cognifloydtest/ansible-st2.git ansible-st2.git); cd ansible-st2.git; time (for role in roles/*; do echo; echo $role; git checkout master; splitsh-lite --progress --prefix $role --target=refs/heads/ansible-role-${role##*/}; git checkout ansible-role-${role##*/}; hub create cognifloydtest/ansible-role-${role##*/}; git remote add ansible-role-${role##*/} [email protected]:cognifloydtest/ansible-role-${role##*/}.git -t master; git push ansible-role-${role##*/} -u ansible-role-${role##*/}:master; done; git checkout master) | |
Cloning into 'ansible-st2.git'... | |
remote: Counting objects: 3576, done. | |
remote: Compressing objects: 100% (31/31), done. | |
remote: Total 3576 (delta 19), reused 30 (delta 11), pack-reused 3529 | |
Receiving objects: 100% (3576/3576), 543.84 KiB | 2.12 MiB/s, done. | |
Resolving deltas: 100% (1909/1909), done. | |
( git clone [email protected]:cognifloydtest/ansible-st2.git) 0.08s user 0.05s system 8% cpu 1.411 total | |
roles/bwc |
This file contains hidden or 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
from __future__ import print_function | |
import eventlet | |
eventlet.monkey_patch() | |
import argparse | |
from nclib import TCPServer, Netcat, NetcatError, NetcatTimeout |
This file contains hidden or 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
--- | |
# StackStorm auth | |
st2_auth_enable: yes | |
# Save credentials under /root/.st2/config | |
st2_save_credentials: yes | |
st2_auth_username: st2admin | |
st2_auth_password: "{{ lookup('password', '{{ my_creds_dir }}/st2-' + inventory_hostname + '-' + st2_auth_username + ' length=42' ) }}" | |
# MongoDB | |
st2mongo_db: st2 |
This file contains hidden or 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: See if authentication is enabled in mongod.conf | |
check_mode: yes | |
lineinfile: | |
path: /etc/mongod.conf | |
insertafter: 'security:' | |
line: ' authorization: enabled' | |
register: mongo_authorization | |
- name: Add mongo admin when authorization is disabled | |
mongodb_user: |
This file contains hidden or 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
from __future__ import print_function | |
import os | |
from pexpect import TIMEOUT, EOF, spawn | |
from pexpect.pxssh import pxssh as orig_pxssh, ExceptionPxssh | |
__all__ = ['ExceptionPxssh', 'pxssh'] | |