- hosts: all gather_facts: no remote_user: root roles: - { role: test_become_r2, sudo_user: testing } tasks: - command: whoami
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
# roles/test1/vars/main.yml | |
--- | |
test_rolevars: TEST1_ROLEVARS | |
# roles/test1/tasks/main.yml | |
--- | |
- debug: msg="testvar = {{ test_rolevars }}" | |
# roles/test2/vars/main.yml | |
--- |
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
diff --git a/library/system/setup b/library/system/setup | |
index e39910f..d21bc71 100644 | |
--- a/library/system/setup | |
+++ b/library/system/setup | |
@@ -1443,21 +1443,23 @@ class LinuxNetwork(Network): | |
netmask = socket.inet_ntoa(struct.pack('!L', netmask_bin)) | |
network = socket.inet_ntoa(struct.pack('!L', address_bin & netmask_bin)) | |
iface = words[-1] | |
- if iface != device: | |
- interfaces[iface] = {} |
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
diff --git a/library/system/authorized_key b/library/system/authorized_key | |
index 54c9576..af4810d 100644 | |
--- a/library/system/authorized_key | |
+++ b/library/system/authorized_key | |
@@ -210,29 +210,36 @@ def parsekey(raw_key): | |
'ssh-rsa', | |
] | |
+ options = None # connection options | |
+ key = None # encrypted key string |
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
# 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] ******************************************************************** |
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/python | |
""" | |
Cobbler external inventory script | |
================================= | |
Ansible has a feature where instead of reading from /etc/ansible/hosts | |
as a text file, it can query external programs to obtain the list | |
of hosts, groups the hosts are in, and even variables to assign to each host. |
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
$ 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" |
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
commit 03c6b73e84ec1550c0be800d841af62df0ba1459 (HEAD -> master, upstream/master) | |
Author: James Cammarata <jimi@sngx.net> | |
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. |
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
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 |
OlderNewer