Skip to content

Instantly share code, notes, and snippets.

View tlezotte's full-sized avatar

Tom LeZotte tlezotte

View GitHub Profile
@tlezotte
tlezotte / ansible_inventory_plugin_example.py
Created June 10, 2020 14:22 — forked from srgvg/ansible_inventory_plugin_example.py
This is a boiler plate example that could be used to write an inventory plugin It shows the use case of retrieving data from a remote API, which might be a slow or costly action, you may want to cache. What needs to be initialized in Ansible to use a cache is shown, too.
# This is a boiler plate example that could be used to write an inventory plugin.
# It shows the use case of retrieving data from a remote API, which might be a
# slow or costly action, you may want to cache.
# What needs to be initialized in Ansible to use a cache is shown, too.
# This example by by Serge van Ginderachter <[email protected]>
# Copyright (c) 2017 Ansible Project
# Copyright (c) 2020 Serge van Ginderachter <[email protected]>
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@tlezotte
tlezotte / generate-ssh-key.sh
Created December 6, 2017 03:03 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa