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
[dag@moria ~]$ cat hosts | |
localhost ansible_connection=local | |
[dag@moria ~]$ ansible -i hosts localhost -m ping | |
localhost | success >> { | |
"changed": false, | |
"ping": "pong" | |
} | |
[dag@moria ~]$ ansible -vv -i hosts localhost -m ping | |
<localhost> REMOTE_MODULE ping |
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
- hosts: computer61 | |
gather_facts: no | |
tasks: | |
- win_regedit: | |
key: HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters | |
value: SMB1 | |
data: 0xffffffff | |
datatype: dword | |
state: present |
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
PLAY [computer61] ************************************************************************************************************************ | |
TASK [win_regedit] *********************************************************************************************************************** | |
[HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters] | |
-"SMB1" = "dword:0" | |
+"SMB1" = "dword:4294967295" | |
changed: [computer61] | |
TASK [win_regedit] *********************************************************************************************************************** | |
ok: [computer61] |
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
[dag@moria ansible.git]$ test/runner/ansible-test integration wakeonlan --tox --python 2.7 -vvv>>> Metadata: metadata-iVbhQs.json | |
{'cloud_config': {}, 'changes': {}} | |
Run command: tox -c test/runner/tox.ini -e py27 -- /home/dag/home-made/ansible.git/test/runner/test.py integration wakeonlan --python 2.7 -vvv --metadata metadata-iVbhQs.json --color yes --requirements | |
Working directory: /home/dag/home-made/ansible.git | |
Program found: /usr/bin/tox | |
HOME=/home/dag | |
LC_ALL=en_US.UTF-8 | |
PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/opt/anvers/default/bin:/home/dag/.local/bin:/home/dag/bin | |
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh | |
py27 installed: appdirs==1.4.3,asn1crypto==0.22.0,bcrypt==3.1.3,cffi==1.10.0,coverage==4.4.1,cryptography==1.9,enum34==1.1.6,idna==2.5,ipaddress==1.0.18,Jinja2==2.9.6,junit-xml==1.7,MarkupSafe==1.0,packaging==16.8,paramiko==2.2.1,pyasn1==0.2.3,pycparser==2.18,PyNaCl==1.1.2,pyparsing==2.2.0,PyYAML==3.12,six==1.10.0 |
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
- hosts: localhost | |
gather_facts: no | |
tasks: | |
- name: Blah | |
aci_interface_policy_leaf_profile: | |
host: '{{ aci_hostname }}' | |
username: '{{ aci_username }}' | |
password: '{{ aci_password }}' | |
validate_certs: '{{ aci_validate_certs | default(false) }}' | |
use_ssl: '{{ aci_use_ssl | default(true) }}' |
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
from voluptuous import Schema, Any, Required | |
schema = Schema([ | |
Any( | |
{ | |
Required('module'): str, | |
'description': str, | |
}, | |
{ | |
Required('ref'): str, |
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
19260 1538698222.91159: no more pending results, returning what we have | |
19260 1538698222.91179: results queue empty | |
19260 1538698222.91194: checking for any_errors_fatal | |
19260 1538698222.91211: done checking for any_errors_fatal | |
19260 1538698222.91224: checking for max_fail_percentage | |
19260 1538698222.91237: done checking for max_fail_percentage | |
19260 1538698222.91250: checking to see if all hosts have failed and the running result is not ok | |
19260 1538698222.91263: done checking to see if all hosts have failed | |
19260 1538698222.91275: getting the remaining hosts for this loop | |
19260 1538698222.91297: done getting the remaining hosts for this loop |
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
ignored_keys = ('hash', 'timestamp') | |
def filter_items(d): | |
''' Filter out keys when returning items() ''' | |
l = [] | |
# Ensure we return sorted tuples | |
for k, v in sorted(d.items()): | |
if k not in ignored_keys: | |
l.append((k, v)) | |
return l |