Skip to content

Instantly share code, notes, and snippets.

View gregbuehler's full-sized avatar

Greg Buehler gregbuehler

View GitHub Profile
@gregbuehler
gregbuehler / pelcod.py
Created October 25, 2012 19:07
Pelco D Protocol in Python
class pelco_options(object):
def __init__(self):
self.__sense = 0
self.__toggle_automan = 0
self.__toggle_onoff = 0
self.__iris_close = 0
self.__iris_open = 0
self.__focus_near = 0
self.__focus_far = 0
self.__zoom_wide = 0
@gregbuehler
gregbuehler / master.yml
Created September 13, 2013 23:35
role dependency issue
#./master.yml
---
- hosts: all
roles:
- { role: monitored }
#./roles/monitored/meta/main.yml
---
dependencies:
@gregbuehler
gregbuehler / user_vars.yml
Last active December 23, 2015 09:29
user script
users:
- { username: user1, password: password }
- { username: user2, password: password }
- { username: user3, password: password }
- { username: user4, password: password }
- name: common | Create user {{ username }}
sudo: yes
user: name={{ username }}
group={{ username }}
groups=wheel
password={{ password }}
update_password=on_create
createhome=yes
home=/home/{{ username }}
state=present
- name: Create the base Ubuntu repository.
file: state=directory path={{ item }} owner=ubuntu group=ubuntu mode=0755 recurse=yes
with_items:
- "/srv/packages/ubuntu/conf"
- "/srv/packages/ubuntu/dists"
- "/srv/packages/ubuntu/dists"
- "/srv/packages/ubuntu/incoming"
- "/srv/packages/ubuntu/indices"
- "/srv/packages/ubuntu/logs"
- "/srv/packages/ubuntu/pool"
---
- hosts: all
vars_files:
- "./vagrant_vars.yml"
tasks:
- name: debug
debug: msg="wtf"
- name: epel | Enable EPEL repo
command: rpm -i --replacepkgs /tmp/epel.rpm
when: epel_installed.stdout|int == 0
sudo: yes
TASK: [epel | Enable EPEL repo] ***********************************************
<127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant
TASK: [debug - java] **********************************************************
<127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant
<127.0.0.1> EXEC ['ssh', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/gbuehler/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=2200', '-o', 'IdentityFile=/Users/gbuehler/.vagrant.d/insecure_private_key', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=vagrant', '-o', 'ConnectTimeout=10', '127.0.0.1', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-1381526141.27-268310734134402 && chmod a+rx $HOME/.ansible/tmp/ansible-1381526141.27-268310734134402 && echo $HOME/.ansible/tmp/ansible-1381526141.27-268310734134402'"]
<127.0.0.1> REMOTE_MODULE command java -version #USE_SHELL
<127.0.0.1> PUT /var/folders/t8/jn34z4m143g8l_qm7xk72fcc0000gn/T/tmpON230w TO /home/vagrant/.ansible/tmp/ansible-1381526141.27-2683107341344
ERROR: Syntax Error while loading YAML script, ./devops/deploy/roles/foo/tasks/main.yml
Note: The error may actually appear before this position: line 19, column 26
copy: src={{ foo }} dest={{ bar }}
when: "virtualbox" != {{ ansible_virtualization_type }}
^
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
openoffice:
{% if versions.openoffice.jodconverter %}
jodconverter:
artifactId: "jodconverter-webapp"
version: "{{versions.openoffice.jodconverter.version}}"
groupId: "com.artofsolving"
packaging: "war"
destFileName: "jodconverter.war"
{% endif %}
{% if versions.openoffice.openoffice %}