Skip to content

Instantly share code, notes, and snippets.

@jruels
jruels / error
Created December 14, 2013 20:47
Ansible playbook and template
fatal: [ansibledb1] => One or more undefined variables: 'dict object' has no attribute 'ansible_eth0'
@jruels
jruels / common_task.yml
Created December 14, 2013 21:54
Playbook with everything.
---
- name: update cache
apt: update_cache=yes
- name: install vim
apt: pkg=vim-nox state=installed
@jruels
jruels / my.cnf
Last active December 31, 2015 09:49
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
#user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
## Replication
#server-id = 2
#master-connect-retry=60
#relay-log = /var/lib/mysql/mysql-relay-bin
@jruels
jruels / Add PPA play.yml
Created December 15, 2013 19:27
JSON stack trace - adding PPA with Ansible
- name: Add MySQL 5.6 PPA
command: '/usr/bin/add-apt-repository -y ppa:ondrej/mysql-5.6'
@jruels
jruels / error
Last active December 31, 2015 11:19
TASK: [magento | Copy Magento local.xml config] *******************************
fatal: [ansibleweb1] => {'msg': "One or more undefined variables: 'dict object' has no attribute 'ansible_eth0'", 'failed': True}
fatal: [ansibleweb1] => {'msg': "One or more undefined variables: 'dict object' has no attribute 'ansible_eth0'", 'failed': True}
@jruels
jruels / gist:9237808
Last active August 29, 2015 13:56
neutron stuff
mysql> select * from routers;
+----------------------------------+--------------------------------------+------------+--------+----------------+--------------------------------------+-------------+
| tenant_id | id | name | status | admin_state_up | gw_port_id | enable_snat |
+----------------------------------+--------------------------------------+------------+--------+----------------+--------------------------------------+-------------+
| e33cf2388aea489c9ad4402e770e8afa | 28acd228-67b8-41aa-bbce-e7edf1ee00dc | RTR-PUBLIC | ACTIVE | 1 | 0f608361-ba50-4609-8467-556d4854b240 | 0 |
+----------------------------------+--------------------------------------+------------+--------+----------------+--------------------------------------+-------------+
1 row in set (0.00 sec)
mysql> select * from routerl3agentbindings;
+--------------------------------------+--------------------------------------+------
@jruels
jruels / gist:9239266
Created February 26, 2014 21:43
neutron B0rked
2014-02-26 21:42:33.357 22294 ERROR neutron.plugins.openvswitch.agent.ovs_neutron_agent [-] Error in agent event loop
2014-02-26 21:42:33.357 22294 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent Traceback (most recent call last):
2014-02-26 21:42:33.357 22294 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 1071, in rpc_loop
2014-02-26 21:42:33.357 22294 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent sync = self.process_network_ports(port_info)
2014-02-26 21:42:33.357 22294 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 1006, in process_network_ports
2014-02-26 21:42:33.357 22294 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent resync_a = self.treat_devices_added(port_info['added'])
2014-02-26 21:42:33.357 22294 TRACE neutron.plugins.openvswitch.age
controller1 [2014-08-15T15:26:24+00:00] WARN: Cloning resource attributes for directory[/var/cache/local/preseeding] from prior resource (CHEF-3694)
controller1 [2014-08-15T15:26:24+00:00] WARN: Previous directory[/var/cache/local/preseeding]: /var/chef/cache/cookbooks/apt/recipes/default.rb:76:in `block in from_file'
controller1 [2014-08-15T15:26:24+00:00] WARN: Current directory[/var/cache/local/preseeding]: /var/chef/cache/cookbooks/mysql/recipes/_server_debian.rb:4:in `from_file'
controller1 [2014-08-15T15:26:24+00:00] WARN: Cloning resource attributes for directory[/var/lib/mysql] from prior resource (CHEF-3694)
controller1 [2014-08-15T15:26:24+00:00] WARN: Previous directory[/var/lib/mysql]: /var/chef/cache/cookbooks/mysql/recipes/_server_debian.rb:34:in `block in from_file'
controller1 [2014-08-15T15:26:24+00:00] WARN: Current directory[/var/lib/mysql]: /var/chef/cache/cookbooks/mysql/recipes/_server_debian.rb:70:in `from_file'
controller1 [2014-08-15T15:26:24+00:00] WARN: Cloning resource attributes
@jruels
jruels / gist:93f32d608178532c65c5
Created August 15, 2014 23:26
razor policies
name: ubuntu-precise
repo: ubuntu-precise
task: ubuntu_precise_amd64
broker: noop
enabled: false
max_count: 100
tags: (none)
nodes: 0
root@511652-razor-dfw:/opt/razor-server# razor nodes node2 log
From http://127.0.0.1:8080/api/collections/nodes/node2/log:
+---------------------------+----------+----------------------+--------------+----------+----------------+--------+----------------+---------------------------------------------+
| timestamp | event | task | template | severity | policy | action | repo | url |
+---------------------------+----------+----------------------+--------------+----------+----------------+--------+----------------+---------------------------------------------+
| 2014-08-15T23:21:47+00:00 | boot | microkernel | boot | info | | | | |
+---------------------------+----------+----------------------+--------------+----------+----------------+--------+----------------+---------------------------------------------+
| 201