Skip to content

Instantly share code, notes, and snippets.

View gist:c2bf82cc267f1f144ae8e82025ace08b
- task:
remote_user: '{{item}}_admin'
loop:
- jeremy
- '{{ansible_user}}'
vars:
ansible_user: '{{ansible_user}}_admin'
View gist:076e3f5d5456dbe8b0dd72bba6f87db6
- hosts: all
vars:
r_std: '{{regvar.get('stdout')|default('')}}'
tasks:
- command: ....
register: regvar
- assert:
that:
View showing alias
ansible.netcommon.cisco_ios_config netconf device configuration
ansible.netcommon.cisco_ios_netconf_get Fetch configuration/state data from NETCONF enabled network devices
apt Manages apt-packages
apt_key Add or remove an apt key
apt_repository Add and remove APT repositories
assemble Assemble configuration files from fragments
assert
View gist:d3c7abd09650e20eb15c69fdb98c4b94
---
- hosts: all
gather_facts: yes
roles:
- usersettings
- role: git
vars:
git_install_from_source: true
git_install_path: "/usr"
git_version: "2.26.2"
View gist:e855a81f649ae8b9aafab6012ecf5751
{
"ansible.netcommon.cli_config": {
"doc": {
"author": "Trishna Guha (@trishnaguha)",
"description": [
"This module provides platform agnostic way of pushing text based configuration to network devices over network_cli connection plugin."
],
"filename": "/home/bcoca/tmp/collections/ansible_collections/ansible/netcommon/plugins/modules/cli_config.py",
"module": "cli_config",
"notes": [
View gist:876b6a688df9dbca4f028d206c503448
{
"add_host": "Add a host (and alternatively a group) to the ansible-playbook in-memory inventory",
"alikins.collection_inspect.collection_inspect": "UNDOCUMENTED",
"alikins.collection_inspect.collection_inspect_no_module_utils": "UNDOCUMENTED",
"alikins.collection_inspect.get_collection_inspect": "UNDOCUMENTED",
"ansible.netcommon.cli_command": "Run a cli command on cli-based network devices",
"ansible.netcommon.cli_config": "Push text based configuration to network devices over network_cli",
"ansible.netcommon.net_banner": "Manage multiline banners on network devices",
View gist:9db03419344b2e75f91c069cb3fe1646
0.08 KB
- hosts: targethost
gather_facts: false
tasks:
- name: Run uptime command
command: uptime
register: output
View gist:64c4b1cc0668eefd9d5cf7f9e6def94d
diff --git a/lib/ansible/plugins/lookup/fileglob.py b/lib/ansible/plugins/lookup/fileglob.py
index 91442dda5e..2460ba15dd 100644
--- a/lib/ansible/plugins/lookup/fileglob.py
+++ b/lib/ansible/plugins/lookup/fileglob.py
@@ -58,8 +58,22 @@ class LookupModule(LookupBase):
ret = []
for term in terms:
term_file = os.path.basename(term)
- dwimmed_path = self.find_file_in_search_path(variables, 'files', os.path.dirname(term))
- if dwimmed_path:
View gist:cb4b35725a4696dd5669749838debd0b
diff --git a/lib/ansible/plugins/lookup/fileglob.py b/lib/ansible/plugins/lookup/fileglob.py
index 91442dda5e..e217793087 100644
--- a/lib/ansible/plugins/lookup/fileglob.py
+++ b/lib/ansible/plugins/lookup/fileglob.py
@@ -58,7 +58,17 @@ class LookupModule(LookupBase):
View gist:6b61603f2d06d5001a35425613630348
.
├── files
│   └── file.txt
├── play.yml
└── roles
└── get_file
└── tasks
└── main.yml
You can’t perform that action at this time.