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/env python3 | |
from pyVim.connect import SmartConnect, Disconnect | |
from pyVmomi import vim, vmodl | |
from cryptography import x509 | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives import hashes | |
from binascii import hexlify | |
from getpass import getpass | |
import ssl | |
import atexit |
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
message: | |
__ansible_vault: >- | |
$ANSIBLE_VAULT;1.1;AES256 | |
36623065363836653763626531636261613834653839353832663236316134646665356539643362 | |
3330353263653837353832316139663963373037636261650a313531613564643337366661313065 | |
30313332383563303866333833613332643631353463346166333565306631316364363039663636 | |
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
--- | |
- name: test_zabbix_user_gorup module test | |
hosts: localhost | |
gather_facts: no | |
tasks: | |
- zabbix_user_group: | |
server_url: http://192.168.0.220/zabbix | |
login_user: admin | |
login_password: zabbix | |
validate_certs: no |
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
[root@localhost ~]# ansible-playbook main.yml -i inventory --module-path module/ | |
PLAY [salf-made windows module test] **************************************************************************************************** | |
TASK [win_file_check] ******************************************************************************************************************* | |
ok: [192.168.0.135] | |
PLAY RECAP ****************************************************************************************************************************** | |
192.168.0.135 : ok=1 changed=0 unreachable=0 failed=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
resourcepool: | |
_moId: resgroup-22 | |
name: Resources | |
customvalue: [] | |
permission: [] | |
storage: | |
dynamictype: null | |
timestamp: {} | |
dynamicproperty: [] | |
perdatastoreusage: [] |
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/env python3 | |
from pyVim.connect import SmartConnect, Disconnect | |
from pyVmomi import vim, vmodl | |
import ssl | |
import atexit | |
host = "" | |
username = "" | |
password = "" | |
mob = vim.VirtualMachine |
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
[root@localhost ~]# sh VMware-VIX-1.15.0-2985596.x86_64.bundle | |
Extracting VMware Installer...done. | |
You must accept the VMware VIX API End User License Agreement to | |
continue. Press Enter to proceed. Enterを押す | |
(snip) | |
and enforceable to the fullest extent permitted by law. | |
Do you agree? [yes/no]: yes |
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
[root@localhost dev]# grep 'def ' ansible-devel/lib/ansible/plugins/cliconf/junos.py | sed -e "s/^ *def //g" -e "s/:$//g" | |
get_text(self, ele, tag) | |
get_device_info(self) | |
get_config(self, source='running', format='text') | |
edit_config(self, command) | |
get(self, command, prompt=None, answer=None, sendonly=False) | |
commit(self, *args, **kwargs) | |
discard_changes(self) | |
get_capabilities(self) | |
compare_configuration(self, rollback_id=None) |
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
--- | |
- name: git test | |
hosts: localhost | |
gather_facts: no | |
vars: | |
# git config | |
#repo: "https://{{ git_user }}:{{ git_pass}}@gitlab.com/username/repo.git" | |
#remote_repo_name: origin | |
#git_user: username | |
#git_pass: password |
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 | |
# -*- coding: utf-8 -*- | |
# Copyright: (c) 2018, sky_joker | |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
from ansible.module_utils.basic import AnsibleModule | |
import json | |
import requests | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning |