Skip to content

Instantly share code, notes, and snippets.

View jimi-c's full-sized avatar

James Cammarata jimi-c

View GitHub Profile
00:25:19.831 utils.py DEBUG task path: /home/jamesc/devel/menufaire_api/roles/menufaire-api/tasks/main.yml:2
00:25:19.831 utils.py ERROR [WARNING]: Failure using method (v2_playbook_on_task_start) in callback plugin (<ansible.plugins.callback./usr/lib/python3.6/site-
00:25:19.832 utils.py ERROR packages/ansible_bender-0.4.0-py3.6.egg/ansible_bender/callback_plugins/snapshoter.CallbackModule object at 0x7f935af45f50>): 'list' object has no attribute 'copy'
00:25:19.832 utils.py DEBUG Callback Exception:
00:25:19.832 utils.py DEBUG File "/data/devel/ansible/lib/ansible/executor/task_queue_manager.py", line 328, in send_callback
00:25:19.832 utils.py DEBUG method(*new_args, **kwargs)
00:25:19.832 utils.py DEBUG File "/usr/lib/python3.6/site-packages/ansible_bender-0.4.0-py3.6.egg/ansible_bender/callback_plugins/snapshoter.py", line 104, in v2_playbook_on_task_start
00:25:19.832 utils.py DEBUG return self._maybe_load_fr
commit 03c6b73e84ec1550c0be800d841af62df0ba1459 (HEAD -> master, upstream/master)
Author: James Cammarata <[email protected]>
Date: Thu Sep 27 00:38:18 2018 -0500
Adding haproxy load balancer for the mysql cluster
This proxy is available via a NodePort service, which can be accessed
from minikube with the `minikube service galera-haproxy-service --url`
command.
$ ansible -m uri -a "url=http://localhost:8888/whatever follow_redirects=yes" localhost
localhost | FAILED! => {
"changed": false,
"content": "",
"failed": true,
"location": "file:///etc/passwd",
"msg": "Status code was not [200]: HTTP Error 301: Found - Redirection to url 'file:///etc/passwd' is not allowed",
"redirected": false,
"status": 301,
"url": "http://localhost:8888/whatever"
# ansible-playbook -vv 13712.yml
Using /etc/ansible/ansible.cfg as config file
1 plays in 13712.yml
PLAY ***************************************************************************
TASK [setup] *******************************************************************
ok: [localhost]
TASK [user] ********************************************************************
- hosts: localhost
gather_facts: no
tasks:
- command:
_raw_params: echo "hello world"
import cStringIO
import multiprocessing
import os
import pickle
import struct
import sys
import zlib
class MyProcess(multiprocessing.Process):
def __init__(self, s):
# ansible-playbook -vv samples/test_blocks_of_blocks.yml
Using /etc/ansible/ansible.cfg as config file
1 plays in samples/test_blocks_of_blocks.yml
PLAY ***************************************************************************
TASK [debug msg=are we there yet?] *********************************************
ok: [localhost] => {
"changed": false,
"msg": "are we there yet?"

Playbook:

- hosts: all
  gather_facts: no
  remote_user: root
  roles:
  - { role: test_become_r2, sudo_user: testing }
  tasks:
 - command: whoami
diff --git a/cloud/docker/docker.py b/cloud/docker/docker.py
index ba0828d..1417da0 100644
--- a/cloud/docker/docker.py
+++ b/cloud/docker/docker.py
@@ -781,7 +781,7 @@ class DockerManager(object):
return containers
- def restart_named_container(self, existing_container):
+ def should_restart_named_container(self, existing_container):
def check_systemd(name):
# verify service is managed by systemd
systemd_enabled = 'false'
f = open('/proc/1/cmdline', 'r')
for line in f:
if 'systemd' in line:
return True
return False