Saravanan666/pypi-org huggingface dataset:
Package: ansible-roster
Ansible Roster Inventory PluginRoster is an Ansible inventory plugin with focus on groups applied to hosts instead of hosts included in groups. It supports ranges (eg: "[0:9]"), regex hostnames (eg: "(dev|prd)-srv"), file inclusions, and variable merging.This inventory plugin has been written withdebopsin mind.Installation from Ansible GalaxyYou can install the latest version from Ansible Galaxy repository.ansible-galaxycollectioninstall-Ujulien_lecomte.roster
python3-mpipinstallboltonscerberusexrexIf you are usingrequirement.ymlfiles for downloading collections and roles, add these lines:collections:-julien_lecomte.rosterInstallation from PyPIYou can install the latest version from PyPI package repository.python3-mpipinstall-Uansible-rosterQuickstartPlease refer to thefull documentationfor all the details.The roster is a file in yaml format and 'yml' or 'yaml' file extension.In order for Ansible to use the plugin and parse your roster file, several conditions must be met:Your yaml file must contain a line indicating that the file is in the roster format.You must activate plugins and enable the roster inventory plugin in youransible.cfg, or in your.debops.cfgif usingdebops. If usingdebops, refresh the configuration withdebops project refresh.Sampleansible.cfg[defaults]# The following line prevents having to pass -i to ansible-inventory.# Filename can be anything as long as it has a 'yml' or 'yaml' extension althoughinventory=roster.yml[inventory]# You must enable the roster plugin if 'auto' does not work for you.# Use 'roster' if installed via the Python package,# Use 'julien_lecomte.roster.roster' if installed via Ansible Galaxyenable_plugins=julien_lecomte.roster.rosterSample.debops.cfg[ansibleinventory]enabled=roster# Use 'roster' if installed via the Python package,# Use 'julien_lecomte.roster.roster' if installed via Ansible Galaxyenable_plugins=julien_lecomte.roster.rosterSampleroster.yml---# This line is mandatory, and enables the plugin differenciating between# any yaml file and a roster yaml file.plugin:rostervars:foobar01:"aglobalvar"groups:debian:vars:distrib:"debian"buster:parents:-debianvars:release:"buster"desktops:vars:components:"maincontribnon-free"hosts:desktop01.internal.example.com:groups:-desktops-busterA larger example Roster inventory for DebOps can be found here:https://gitlab.com/jlecomte/ansible/ansible-roster-example.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.SupportShow your support by joining the Discord server (link below), or by adding a star to the project.LocationsDocumentation:https://jlecomte.gitlab.io/ansible/ansible-roster/GitLab:https://gitlab.com/jlecomte/ansible/ansible-rosterPyPi:https://pypi.org/project/ansible-rosterGalaxy:https://galaxy.ansible.com/julien_lecomte/rosterDiscord:https://discord.gg/Dhttff9MrT
Package: ansible-rulebook
ansible-rulebookFree software: Apache Software License 2.0Event driven automation for Ansible.The real world is full of events that change the state of our software and systems.
Our automation needs to be able to react to those events. Introducingansible-rulebook; a command
line tool that allows you to recognize events that you care about and react accordingly
by running a playbook or other actions.FeaturesConnect to event streams and handle events in near real time.Conditionally launch playbooks or Tower’s job templates based on rules that match events in event streams.Store facts about the world from data in eventsLimit the hosts where playbooks run based on event dataRun smaller jobs that run more quickly by limiting the hosts where playbooks run based on event dataInstallationPlease follow theInstallation guideto installansible-rulebook.DocumentationPlease refer to theGetting Started guideto get started withansible-rulebook.ContributingWe ask all of our community members and contributors to adhere to theAnsible code of conduct.
If you have questions or need assistance, please reach out to our community team atcodeofconduct@ansible.comRefer to the Contributing guide to get started developing, reporting bugs or providing feedback.Creditsansible-rulebook is sponsored byRed Hat, Inc.This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: ansible-runner
Ansible RunnerAnsible Runner is a tool and Python library that helps when interfacing with Ansible directly or as part of another system. Ansible Runner works as a standalone tool, a container image interface, or a Python module that can be imported. The goal is to provide a stable and consistent interface abstraction to Ansible.See thelatest documentationfor usage details.Get InvolvedGitHub issuesto track bug report and feature ideasGitHub Milestonesto track what's for the next releaseWant to contribute? Please check out ourcontributing guideJoin us in the#ansible-runnerchannel on Libera.chat IRCJoin the discussion in#awx-projectFor the full list of Ansible email Lists, IRC channels see theAnsible Mailing lists.
Package: ansiblerunnerapi
AnsibleRunner拷貝自jumpserver項目installpip install ansible==2.8.8RunnerAnsible Command Runnersimple runnerrunner = CommandRunner()
runner.execute('ls')inventory hostshost_data = [
    {
        "hostname": "demo-web1",
        "ip": "192.168.33.101",
        "port": 2222,
        "username": "root",
        "private_key": "/Users/maliao/.ssh/id_rsa",
    },
    {
        "hostname": "demo-web2",
        "ip": "192.168.33.102",
        "port": 2222,
        "username": "root",
        "private_key": "/Users/maliao/.ssh/id_rsa",
    },
    {
        "hostname": "demo-web3",
        "ip": "192.168.33.103",
        "port": 2222,
        "username": "root",
        "private_key": "/Users/maliao/.ssh/id_rsa",
    },
    {
        "hostname": "demo-web4",
        "ip": "192.168.33.104",
        "port": 2222,
        "username": "root",
        "private_key": "/Users/maliao/.ssh/id_rsa",
    },
]
runner = CommandRunner(inventory=host_data)
runner.execute('ls')Ansible Playbook Runnersimple runnerrunner = PlayBookRunner(hostname='maliao-web1',path='test.yml')
runner.run()optionrunner1 = PlayBookRunner(hostname='maliao-web1', path='test.yml',options={'memory_mb': 1024, 'size_gb': 30,'num_cpus': 2})
runner1.run()inventory hostshosts = [
    {
        "hostname": 'maliao-web1',
        "ip": '192.168.1.1',
        "port": '22',
        "username": "root",
        "private_key": "/Users/maliao/.ssh/id_rsa"
    },
    {
        "hostname": 'maliao-web1',
        "ip": '192.168.1.1',
        "port": '22',
        "username": "root",
        "private_key": "/Users/maliao/.ssh/id_rsa"
    },
]

runner2 = PlayBookRunner(hostname='maliao-web1', path='test.yml', inventory=hosts)
runner2.run()Callbackgather_result任務開始
v2_playbook_on_play_start任務成功
v2_runner_on_ok無法連接
v2_runner_on_unreachable任務失敗
v2_runner_on_failed
Package: ansible-runner-beats
Ansible Runner beats Event EmitterThis project is a plugin forAnsible Runnerthat allows emitting Ansible status and events to Logstash through the Beats protocol. This can allowRunnerto notify other systems as Ansible jobs are run and to deliver key events to that system if it's interested.It is useful to send data to Logstash through the Beats protocol.This plugin is inspired byansible-runner-httplicensed under Apache License 2.0:zap: Installationpython3-mpipinstallansible-runner-beats:gear: VariablesRunner configEnvironment variableDefault valuerunner_beats_hostRUNNER_BEATS_HOSTNonerunner_beats_portRUNNER_BEATS_PORTNonerunner_beats_ssl_certRUNNER_BEATS_SSL_CERT""runner_beats_ssl_keyRUNNER_BEATS_SSL_KEY""runner_beats_ssl_caRUNNER_BEATS_SSL_CA""runner_beats_custom_fieldsRUNNER_BEATS_CUSTOM_FIELDS{}The plugin also register an environment variable namedRUNNER_BEATS_TIMEDOUTif the beats endpoint is not available:copyright:LicenseMozilla Public License Version 2.0
Package: ansible-runner-http
Ansible Runner HTTP Event EmitterThis project is a plugin forAnsible Runnerthat allows emitting Ansible status and events to HTTP services in the form ofPOSTevents. This can allowRunnerto notify other systems as Ansible jobs are run and to deliver key events to that system if it's interested.For more details and the latest documentation see:https://ansible-runner.readthedocs.io/en/latest
Package: ansible-runner-kafka
Ansible Runner Kafka Event Emitter=================================This project is a plugin for [Ansible Runner](https://github.com/ansible/ansible-runner) that allows emitting Ansible status and events to Kafka topics.For more details and the latest documentation see: https://ansible-runner.readthedocs.io/en/latestThis plugin is very *very* basic. Especially error-handling is missing, since the produce-call is asymmetric, and I don't know how to return errors back to ansible runner.Also the repeated initialization of the producer and call to flush is not very efficient.Available settings------------------These [runner-settings](https://ansible-runner.readthedocs.io/en/latest/intro.html#env-settings-settings-for-runner-itself) are available:- `bootstrap_servers` input for confluent-kafka's producer's *bootstrap_servers*. **default**: None. **Sample**: localhost:9092. If not set, this plugin will be skipped- `event_topic` topic to produce events to. **default**: ansible.runner.event. **Sample**: event- `status_topic` topic to produces status messages to. **default**: ansible.runner.status. **Sample**: status
Package: ansible-runner-nats
Ansible Runner NATS Event EmitterThis project is a plugin forAnsible Runnerthat allows emitting Ansible status and events to NATS in the form of published messages. This can allowRunnerto notify other systems as Ansible jobs are run and to deliver key events to that system if it's interested.For more details and the latest documentation see:https://ansible-runner.readthedocs.io/en/latestConfiguring the emitterDefault behaviourBy default the emitter is disabled.Enabling the emitterIn order to enable the emitter, subject ID must be configured either asnats_subject_idvariable or as an environment variable:RUNNER_NATS_SUBJECT_ID: Subject IDWhen subject ID is configured, messages are published to the following subjects:pub.ansible.runner.{subject_id}.{runner_ident}.event: message contains an eventpub.ansible.runner.{subject_id}.{runner_ident}.status: message contains a status updaterunner_identis an auto-generated UUID assigned to each runner instance.Special case: ifRUNNER_NATS_SUBJECT_IDis set tohostname, then hostname read usingsocket.gethostname()is used as subject id.Configuring headersHeaders can be configured to be sent with each message.They can be provided as comma separated list of keyvalues (using=).Example:RUNNER_NATS_HEADERS="producer=ansible-runner,foo=bar"Configuring NATS clientNATS client options can be provided asnats_optionssettings in the runner config settings.Configuring client authenticationThe following environment variables can be set to authenticate the client:RUNNER_NATS_USERNAME: user nameRUNNER_NATS_PASSWORD: user passwordRUNNER_NATS_TOKEN: connection tokenRUNNER_NATS_USER_CREDENTIALS: user credentialsRUNNER_NATS_NKEYS_SEED: user nkey seedConfiguring serversRUNNER_NATS_SERVERS: comma separated list of NATS server URLs.Advanced configurationRUNNER_NATS_CLIENT_NAME: client nameRUNNER_NATS_CLIENT_VERBOSE: enable verbose mode when value istrue,yes,y,1oron.RUNNER_NATS_ALLOW_RECONNECT: allow reconnect when value istrue,yes,y,1oron.RUNNER_NATS_CONNECT_TIMEOUT: connection timeout in secondsRUNNER_NATS_RECONNECT_TIME_WAIT: time to wait before reconnectingRUNNER_NATS_MAX_RECONNECT_ATTEMPTS:  maximum number of reconnect attemptsRUNNER_NATS_PING_INTERVAL: interval between system pingsRUNNER_MAX_OUTSTANDING_PINGS: maximum number of outstanding ping before considering connection staleRUNNER_NATS_FLUSHER_QUEUE_SIZE: maximum size of flusher queue
Package: ansible-sdk
Ansible SDK for PythonThe Ansible SDK provides lightweight Python library for dispatching and live-monitoring
Ansible tasks, roles, and playbooks from the product or project.Dispatching of jobs can be local to the machine you are running your python application from or over Ansible Mesh using the receptor integrations.Demo App to show how you can use the SDK in real use case -https://github.com/ansible/ansible_sdk_demoDocumentationWe are building extensive documentation and API reference here -https://ansible-sdk.readthedocs.io/en/latest/install.htmlPlease feel free to contribute and help the documentation effort.You can build the documentation from this repository as follows:$ tox -e docs
$ firefox docs/build/html/If you want to run Sphinx commands directly, open thetox.inifile and use the commands in the[testenv:docs]section.
Remember that you need to pip installdocs/doc-requirements.txtbefore running Sphinx.Releases and maintenanceTBDAnsible version compatibilityTBDInstallationYou can follow the installation guide specified indocs.Required Python libraries and SDKsThe Ansible-SDK depends on Python 3.8+, Ansible Core, Ansible Runner and other third party libraries:ansible-coreasyncioansible-runnerreceptorctlTesting and DevelopmentRed Hat Enterprise Linux - Install Ansible-SDK and dependecies directly on/into a RHEL Virtual machine.
MacOS - Install PODMAN using BREW, and pull the RHEL8 image, ssh to that and follow the RHEL instructions above.CommunicationTBDLicenseSeeLICENSEto see the full text.
Package: ansible-sign
ansible-signThis is a library and auxillary CLI tool for dealing with Ansible content
verification.It does the following:checksum manifest generation and validation (sha256sum)GPG detached signature generation and validation (using python-gnupg) for
contentNote: The API (library) part of this package is not officially supported and
might change as time goes on. CLI commands should be considered stable within
major verions (theXof versionX.Y.Z).Documentation can be foundhereincluding arundown/tutorialexplaining how to use the CLI for basic project signing and verification.
Package: ansible-simple
ansible_simpleA simple SDK to use Ansible API.usagepip install ansible-simpleansible modulefromansible_simple.apiimportAnsibleApia=AnsibleApi(remote_user="root",hosts=["192.168.13.109","192.168.13.56"],remote_password={"conn_pass":"password"})# a.run(module='shell', args='hostname')# print(a.get_result())ansible playbook-name:mydbserverhosts:mydbservergather_facts:notasks:-name:uptimeraw:uptimeregister:uptime-debug:msg:"{{uptime.stdout}}"-name:online pm2 lsraw:lsregister:ls-debug:msg:"{{ls.stdout}}"a.playbook(dynamic_inv={"mydbserver":["192.168.13.109","192.168.13.56"]},playbooks=['test.yml'])# print(a.get_result())referencehttps://packaging.python.org/en/latest/tutorials/packaging-projects/https://docs.ansible.com
Package: ansiblespawner
AnsibleSpawnerSpawnJupyterHubsingle user notebook servers usingAnsible.This spawner runs Ansible playbooks to start, manage and stop JupyterHub singleuser servers.
This means any Ansible module can be used to orchestrate your singleuser servers, includingDocker and many public/private clouds, and other infrastructure platforms supported by the community.
You can do things like create multiple storage volumes for each user, or provision additional services on other containers/VMs.PrerequisitesPython 3.6 or above and JupyterHub 1.0.0 or above are required.InstallationConfigurationExamplejupyterhub_config.pyspawner configuration.ansible_path = "/path/to/"
c.JupyterHub.spawner_class = "ansible"
c.AnsibleSpawner.inventory = ansible_path + "inventory.yml.j2"
c.AnsibleSpawner.create_playbook = ansible_path + "create.yml"
c.AnsibleSpawner.update_playbook = ansible_path + "update.yml"
c.AnsibleSpawner.poll_playbook = ansible_path + "poll.yml"
c.AnsibleSpawner.destroy_playbook = ansible_path + "destroy.yml"
c.AnsibleSpawner.playbook_vars = {
    "container_image": "docker.io/jupyter/base-notebook",
    "ansible_python_interpreter": "python3",
}
c.AnsibleSpawner.start_timeout = 600
c.JupyterHub.hub_connect_ip = "10.0.0.1"See the example playbooks under./examplesDevelopmentPytest is used to run automated tests that requireDockerandPodman.
These platforms were chosen because they are self-contained and can be installed in Travis, whereas testing with public cloud platforms requires secure access credentials.If you only have one of these you can limit tests by specifying a marker.
For example, to disable the Docker tests:pytest -vs -m "not docker"To view test coverage run pytest with--cov=ansiblespawner --cov-report=html, then openhtmlcov/index.html.setuptools-scmis used to manage versions.
Just create a git tag.
Package: ansible-ssh
Adds interactive SSH capabilities to Ansible,
especially useful in setups with VMs in private
subnets accessible only via jumphosts.It uses Ansible’s inventory file so anyansible_ssh_common_argsoransible_ssh_extra_argsapply toansible-sshas well.RequirementsansiblepipUsageRun with-hfor command-line help:usage: ansible-ssh [-h] [--inventory INVENTORY] [--key-file KEYFILE]
                   [--user USER] [--verbose] [--become]
                   host

positional arguments:
  host                  the host to ssh into, if not provided a list of hosts
                        in current inventory file is printed

optional arguments:
  -h, --help            show this help message and exit
  --inventory INVENTORY, -i INVENTORY
                        ansible inventory file to use instead of the one
                        defined in ansible.cfg
  --key-file KEYFILE, -k KEYFILE
                        ssh private key file to use instead of the default for
                        the user
  --user USER, -u USER, -l USER
                        override the user defined in ansible inventory file
  --verbose, -v         pass verbose flag to ssh command
  --become, -b          ssh as root instead of the inventory-supplied accountExample$ansible-sshlb-0executingssh-C-oControlMaster=auto-oControlPersist=60s-oProxyCommand="ssh -W %h:%p -q ubuntu@10.200.100.60"-lubuntu192.168.1.30Lastlogin:SatMay2515:40:132019from192.168.1.100ubuntu@lb-0:~$
Package: ansible-subprocess
# ansible-subprocess[![Build Status](https://travis-ci.org/uehara1414/ansible-subprocess.svg?branch=master)](https://travis-ci.org/uehara1414/ansible-subprocess)ansible-subprocess run Ansible dynamically via the subprocess module.## Demo```pythonfrom ansible_subprocess import run_playbook, run_pingstatus, stdout, stderr = run_playbook('playbooks/sample.yml', 'web')status, stdout, stderr = run_playbook('playbooks/sample2.yml',['127.0.0.1', '127.0.0.2'],extra_vars={'var1': 'hoge', 'var2': 'fuga'},extra_options=['--syntax-check'])status, stdout, stderr = run_ping(['8.8.8.8'])```## Installation```bashpip install ansible-subprocess```## License[MIT](https://github.com/uehara1414/ansible-subprocess/blob/master/LICENSE)
Package: ansible-template-validator
ansible-config-validatorA helper script to use with the validate option from ansibletemplatemoduleThe module provides a command line tool to validate configuration templates in cases where the validation depends
on more than one file, and there is no clear way to sandboxing the validation process.So, for example, if you want to validate anNGINXconfig file that contains a server block configuration you will have
to validate the entire configuration tree ofNGINXfiles, therefore what this script does is to replace
the original config file with the new one, runs the validation command, and then restores all to the previous state
independently of the validation command result.Installpipinstallansible-config-validatorUsageusage:ansible-template-validator[-h][-lSYMLINK]new_fileoriginal_filevalidation_command

Commandtobeusedashelperwithansibletemplatevalidate.Replaces
original_filewithnew_file,andthenrunvalidation_command.Afterthis,
returnsvalidation_commandreturncodeandoriginal_fileisrestored.Ifa
symlinkisspecified,incaseitdoesn't exists, it is created pointing tooriginal_file and then is deleted.positional arguments:new_file              File used to replace original_fileoriginal_file         Original file that is going to be validatedvalidation_command    Command to be executed to validate the config filesoptional arguments:-h, --help            show this help message and exit-l SYMLINK, --create-sym-link SYMLINKCreates an ephemeral symbolic link pointing tooriginal_file, just in case it doesn'texists.Example-name:Update nginx {{website_config}} filetemplate:src:"website.conf"dest:"{{website_config}}"validate:"ansible-template-validator%s{{website_config}}{{nginx_validation_command|quote}}"vars:website_config:"/etc/nginx/sites-enabled/website.conf"nginx_validation_command:/usr/sbin/nginx -t -q -g 'daemon on; master_process on;Note:The script must have been previously installed on the target node.
Package: ansible-terminal
Ansible SSHThis script list hosts which are defined in Ansible Inventory and open SSH/SFTP connection to host which is selected.UsagePrint usage:ansible-terminalPrint version:ansible-terminal -vWork with Ansible Inventory by different optionsusage: ansible-terminal [-h] -a [INVENTORY_PATH [INVENTORY_PATH ...]] -p
                        {ssh,sftp} [--debug] [-v] [-n NAME] [-u SSH_USER]
                        [-k SSH_KEY]

Open SSH/SFTP session to hosts defined in Ansible Inventory

optional arguments:
  -h, --help            show this help message and exit
  -a [INVENTORY_PATH [INVENTORY_PATH ...]]
                        Path for Ansible Inventory file or directory. Multiple
                        definitions can be done.If directory is given, all
                        Ansible Inventory files will be parsed recursively
  -p {ssh,sftp}         Protocol type for connection to Hosts. ssh / sftp
  --debug               Enable debug logs
  -v                    show program's version number and exit
  -n NAME               Name of host to search. If one host matches, will
                        connect automaically
  -u SSH_USER           SSH Username for ssh connection type. This will
                        override ansible_ssh_user for all connections
  -k SSH_KEY            SSH Key File path for ssh connection type. This will
                        override ansible_ssh_private_key_file for all
                        connectionsPyPI -https://pypi.org/project/ansible-terminal/NotesFor default, Below parameters are used for SSH/SFTP connection.user: root
ssh-key: ~/.ssh/
target machine: hostYou can overwrite these values by defining relatedAnsible Behavioral Inventory Propertiesin the inventory.
Parameters:ansible_ssh_user
ansible_host
ansible_ssh_private_key_fileThanksPlease do not forget to star when you are using : )
Package: ansible-test
Ansible-test is a tool for testing your automation on local docker images. You can think of this as a slim version of Chef’s test-kitchen$cd/my/ansible/repository$ansible-testmy_ansible_roleThe above command will drop a Dockerfile at the root of your ansible repo and initialize a docker image with ansible installed. It will then run the ansible role “my_ansible_role”.Note that ansible-test also accepts arbitrary arguments. These arguments will be passed onto the ansible-playbook command while running tests.InstallationTo install ansible-test:$pipinstallansible-testDocumentationansible-test requires that you have docker installed locally. If you are using Mac OSX, I reccommend you use boot2docker.NOTE: Given docker’s inflexibility with Dockerfiles, ansible-test will overwrite the file Dockerfile at the current working directory from which you run ansible-test. This is currently the simplest way to integrate docker as a testing tool.