My personal dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_ansible 37KB

  1. #compdef ansible
  2. # ------------------------------------------------------------------------------
  3. # Copyright (c) 2011 Github zsh-users -
  4. # All rights reserved.
  5. #
  6. # Redistribution and use in source and binary forms, with or without
  7. # modification, are permitted provided that the following conditions are met:
  8. # * Redistributions of source code must retain the above copyright
  9. # notice, this list of conditions and the following disclaimer.
  10. # * Redistributions in binary form must reproduce the above copyright
  11. # notice, this list of conditions and the following disclaimer in the
  12. # documentation and/or other materials provided with the distribution.
  13. # * Neither the name of the zsh-users nor the
  14. # names of its contributors may be used to endorse or promote products
  15. # derived from this software without specific prior written permission.
  16. #
  27. # ------------------------------------------------------------------------------
  28. # Description
  29. # -----------
  30. #
  31. # Completion script for ansible v2.0.0.2 (
  32. #
  33. # ------------------------------------------------------------------------------
  34. # Authors
  35. # -------
  36. #
  37. # * Romain Bossart (
  38. # * Adam Stevko (
  39. #
  40. # ------------------------------------------------------------------------------
  41. #
  42. # Needs either ANSIBLE_HOSTS or /etc/ansible/hosts on linux
  43. # (or /usr/local/etc/ansible/hosts on OSX)
  44. #
  45. # Note 1: the following gist (
  46. # has some files to help improve the hostfile shell parsing
  47. #
  48. # Note 2: I tried to use `_arguments --`, but the output of `ansible --help`
  49. # is not parsed entirely correctly, and anyway no modules or host would available.
  50. #
  51. # ansible zsh completion
  52. #
  53. __host_file_location () {
  54. # find the location of the host file:
  55. # 1. check $ANSIBLE_HOSTS
  56. # 2. else check /etc/ansible/hosts or /usr/local/etc/...
  57. # (depending on platform)
  58. #
  59. [[ "$OSTYPE" == darwin* ]] && FALLBACK="/usr/local/etc/ansible/hosts"
  60. [[ "$OSTYPE" == linux* ]] && FALLBACK="/etc/ansible/hosts"
  62. [[ -f ${HOST_FILE} ]] || HOST_FILE=/dev/null
  63. echo ${HOST_FILE}
  64. }
  65. __ll_group_list () {
  66. # parses the ini hostfile for groups only: [...]
  67. HOST_FILE=$(__host_file_location)
  68. local -a group_list
  69. group_list=$(command \
  70. cat ${HOST_FILE} \
  71. | awk '$1 ~ /^\[.*\]$/ && !/=/ && !/:vars/ \
  72. { gsub(/[\[\]]/, "", $1); gsub(/:children/, "", $1) ; print $1 }' \
  73. | uniq )
  74. echo ${group_list}
  75. }
  76. __host_list ()
  77. {
  78. # parses the ini hostfile for hosts only
  79. # but then has to remove all group occurrences
  80. HOST_FILE=$(__host_file_location)
  81. # this will also contain groups if they are referenced in other groups
  82. local -a mixed_host_list
  83. mixed_host_list=$(command \
  84. cat ${HOST_FILE} \
  85. | awk 'NF && $1 !~ /^[:space:]*#|[\[:=]/ { print $1 }' \
  86. | sort | uniq)
  87. # compute set difference h1 - h2
  88. local -a h1 h2 host_list
  89. h1=${mixed_host_list}
  90. h2=$(__ll_group_list)
  91. host_list=($(command \
  92. sort <(echo $h1) <(echo $h2) <(echo $h2) \
  93. | uniq -u \
  94. | paste -s -d ' ' - )
  95. )
  96. _wanted application expl 'hosts' compadd ${host_list}
  97. # method that delegates to ansible (slow)
  98. # _wanted application expl 'hosts' compadd $(command ansible \
  99. # all --list-hosts\
  100. # 2>/dev/null)
  101. }
  102. __group_list ()
  103. {
  104. gl=($(command echo $(__ll_group_list) | paste -s -d ' ' - )) # 'a\nb\nc' -> (a b c)
  105. _wanted application2 expl 'groups' compadd $gl
  106. }
  107. _modules=(
  108. 'a10_server:Manage A10 Networks AX/SoftAX/Thunder/vThunder devices'
  109. 'a10_service_group:Manage A10 Networks devices’ service groups'
  110. 'a10_virtual_server:Manage A10 Networks devices’ virtual servers'
  111. 'accelerate:Enable accelerated mode on remote node'
  112. 'acl:Sets and retrieves file ACL information.'
  113. 'add_host:add a host (and alternatively a group) to the ansible-playbook in-memory inventory'
  114. 'airbrake_deployment:Notify airbrake about app deployments'
  115. 'alternatives:Manages alternative programs for common commands'
  116. 'apache2_module:enables/disables a module of the Apache2 webserver'
  117. 'apk:Manages apk packages'
  118. 'apt:Manages apt-packages'
  119. 'apt_key:Add or remove an apt key'
  120. 'apt_repository:Add and remove APT repositories'
  121. 'apt_rpm:apt_rpm package manager'
  122. 'assemble:Assembles a configuration file from fragments'
  123. 'assert:Fail with custom message'
  124. 'async_status:Obtain status of asynchronous task'
  125. 'at:Schedule the execution of a command or script file via the at command.'
  126. 'authorized_key:Adds or removes an SSH authorized key'
  127. 'azure:create or terminate a virtual machine in azure'
  128. 'bigip_facts:Collect facts from F5 BIG-IP devices'
  129. 'bigip_gtm_wide_ip:Manages F5 BIG-IP GTM wide ip'
  130. 'bigip_monitor_http:Manages F5 BIG-IP LTM http monitors'
  131. 'bigip_monitor_tcp:Manages F5 BIG-IP LTM tcp monitors'
  132. 'bigip_node:Manages F5 BIG-IP LTM nodes'
  133. 'bigip_pool:Manages F5 BIG-IP LTM pools'
  134. 'bigip_pool_member:Manages F5 BIG-IP LTM pool members'
  135. 'bigip_virtual_server:Manages F5 BIG-IP LTM virtual servers'
  136. 'bigpanda:Notify BigPanda about deployments'
  137. 'blockinfile:Insert/update/remove a text block surrounded by marker lines.'
  138. 'boundary_meter:Manage boundary meters'
  139. 'bower:Manage bower packages with bower'
  140. 'bundler:Manage Ruby Gem dependencies with Bundler'
  141. 'bzr:Deploy software (or files) from bzr branches'
  142. 'campfire:Send a message to Campfire'
  143. 'capabilities:Manage Linux capabilities'
  144. 'circonus_annotation:create an annotation in circonus'
  145. 'cl_bond:Configures a bond port on Cumulus Linux'
  146. 'cl_bridge:Configures a bridge port on Cumulus Linux'
  147. 'cl_img_install:Install a different Cumulus Linux version.'
  148. 'cl_interface:Configures a front panel port, loopback or management port on Cumulus Linux.'
  149. 'cl_interface_policy:Configure interface enforcement policy on Cumulus Linux'
  150. 'cl_license:Install Cumulus Linux license'
  151. 'cl_ports:Configure Cumulus Switch port attributes (ports.conf)'
  152. 'clc_aa_policy:Create or Delete Anti Affinity Policies at CenturyLink Cloud.'
  153. 'clc_alert_policy:Create or Delete Alert Policies at CenturyLink Cloud.'
  154. 'clc_blueprint_package:deploys a blue print package on a set of servers in CenturyLink Cloud.'
  155. 'clc_firewall_policy:Create/delete/update firewall policies'
  156. 'clc_group:Create/delete Server Groups at Centurylink Cloud'
  157. 'clc_loadbalancer:Create, Delete shared loadbalancers in CenturyLink Cloud.'
  158. 'clc_modify_server:modify servers in CenturyLink Cloud.'
  159. 'clc_publicip:Add and Delete public ips on servers in CenturyLink Cloud.'
  160. 'clc_server:Create, Delete, Start and Stop servers in CenturyLink Cloud.'
  161. 'clc_server_snapshot:Create, Delete and Restore server snapshots in CenturyLink Cloud.'
  162. 'cloudflare_dns:manage Cloudflare DNS records'
  163. 'cloudformation:Create or delete an AWS CloudFormation stack'
  164. 'cloudtrail:manage CloudTrail creation and deletion'
  165. 'command:Executes a command on a remote node'
  166. 'composer:Dependency Manager for PHP'
  167. 'consul:Add, modify & delete services within a consul cluster.'
  168. 'consul_acl:manipulate consul acl keys and rules'
  169. 'consul_kv:Manipulate entries in the key/value store of a consul cluster.'
  170. 'consul_session:manipulate consul sessions'
  171. 'copy:Copies files to remote locations.'
  172. 'cpanm:Manages Perl library dependencies.'
  173. 'cron:Manage cron.d and crontab entries.'
  174. 'cronvar:Manage variables in crontabs'
  175. 'crypttab:Encrypted Linux block devices'
  176. 'cs_account:Manages accounts on Apache CloudStack based clouds.'
  177. 'cs_affinitygroup:Manages affinity groups on Apache CloudStack based clouds.'
  178. 'cs_cluster:Manages host clusters on Apache CloudStack based clouds.'
  179. 'cs_configuration:Manages configuration on Apache CloudStack based clouds.'
  180. 'cs_domain:Manages domains on Apache CloudStack based clouds.'
  181. 'cs_facts:Gather facts on instances of Apache CloudStack based clouds.'
  182. 'cs_firewall:Manages firewall rules on Apache CloudStack based clouds.'
  183. 'cs_instance:Manages instances and virtual machines on Apache CloudStack based clouds.'
  184. 'cs_instance_facts:Gathering facts from the API of instances from Apache CloudStack based clouds.'
  185. 'cs_instancegroup:Manages instance groups on Apache CloudStack based clouds.'
  186. 'cs_ip_address:Manages public IP address associations on Apache CloudStack based clouds.'
  187. 'cs_iso:Manages ISO images on Apache CloudStack based clouds.'
  188. 'cs_loadbalancer_rule:Manages load balancer rules on Apache CloudStack based clouds.'
  189. 'cs_loadbalancer_rule_member:Manages load balancer rule members on Apache CloudStack based clouds.'
  190. 'cs_network:Manages networks on Apache CloudStack based clouds.'
  191. 'cs_pod:Manages pods on Apache CloudStack based clouds.'
  192. 'cs_portforward:Manages port forwarding rules on Apache CloudStack based clouds.'
  193. 'cs_project:Manages projects on Apache CloudStack based clouds.'
  194. 'cs_resourcelimit:Manages resource limits on Apache CloudStack based clouds.'
  195. 'cs_securitygroup:Manages security groups on Apache CloudStack based clouds.'
  196. 'cs_securitygroup_rule:Manages security group rules on Apache CloudStack based clouds.'
  197. 'cs_sshkeypair:Manages SSH keys on Apache CloudStack based clouds.'
  198. 'cs_staticnat:Manages static NATs on Apache CloudStack based clouds.'
  199. 'cs_template:Manages templates on Apache CloudStack based clouds.'
  200. 'cs_user:Manages users on Apache CloudStack based clouds.'
  201. 'cs_vmsnapshot:Manages VM snapshots on Apache CloudStack based clouds.'
  202. 'cs_volume:Manages volumes on Apache CloudStack based clouds.'
  203. 'cs_zone:Manages zones on Apache CloudStack based clouds.'
  204. 'cs_zone_facts:Gathering facts of zones from Apache CloudStack based clouds.'
  205. 'datadog_event:Posts events to DataDog service'
  206. 'datadog_monitor:Manages Datadog monitors'
  207. 'debconf:Configure a .deb package'
  208. 'debug:Print statements during execution'
  209. 'deploy_helper:Manages some of the steps common in deploying projects.'
  210. 'digital_ocean:Create/delete a droplet/SSH_key in DigitalOcean'
  211. 'digital_ocean_domain:Create/delete a DNS record in DigitalOcean'
  212. 'digital_ocean_sshkey:Create/delete an SSH key in DigitalOcean'
  213. 'django_manage:Manages a Django application.'
  214. 'dnf:Manages packages with the *dnf* package manager'
  215. 'dnsimple:Interface with (a DNS hosting service).'
  216. 'dnsmadeeasy:Interface with (a DNS hosting service).'
  217. 'docker:manage docker containers'
  218. 'docker_image:manage docker images'
  219. 'docker_login:Manage Docker registry logins'
  220. 'dpkg_selections:Dpkg package selection selections'
  221. 'dynamodb_table:Create, update or delete AWS Dynamo DB tables.'
  222. 'easy_install:Installs Python libraries'
  223. 'ec2:create, terminate, start or stop an instance in ec2'
  224. 'ec2_ami:create or destroy an image in ec2'
  225. 'ec2_ami_copy:copies AMI between AWS regions, return new image id'
  226. 'ec2_ami_find:Searches for AMIs to obtain the AMI ID and other information'
  227. 'ec2_ami_search(D):Retrieve AWS AMI information for a given operating system.'
  228. 'ec2_asg:Create or delete AWS Autoscaling Groups'
  229. 'ec2_eip:associate an EC2 elastic IP with an instance.'
  230. 'ec2_elb:De-registers or registers instances from EC2 ELBs'
  231. 'ec2_elb_facts:Gather facts about EC2 Elastic Load Balancers in AWS'
  232. 'ec2_elb_lb:Creates or destroys Amazon ELB.'
  233. 'ec2_eni:Create and optionally attach an Elastic Network Interface (ENI) to an instance'
  234. 'ec2_eni_facts:Gather facts about ec2 ENI interfaces in AWS'
  235. 'ec2_facts:Gathers facts about remote hosts within ec2 (aws)'
  236. 'ec2_group:maintain an ec2 VPC security group.'
  237. 'ec2_key:maintain an ec2 key pair.'
  238. 'ec2_lc:Create or delete AWS Autoscaling Launch Configurations'
  239. 'ec2_metric_alarm:Create/update or delete AWS Cloudwatch ‘metric alarms’'
  240. 'ec2_remote_facts:Gather facts about ec2 instances in AWS'
  241. 'ec2_scaling_policy:Create or delete AWS scaling policies for Autoscaling groups'
  242. 'ec2_snapshot:creates a snapshot from an existing volume'
  243. 'ec2_tag:create and remove tag(s) to ec2 resources.'
  244. 'ec2_vol:create and attach a volume, return volume id and device map'
  245. 'ec2_vol_facts:Gather facts about ec2 volumes in AWS'
  246. 'ec2_vpc:configure AWS virtual private clouds'
  247. 'ec2_vpc_dhcp_options:Manages DHCP Options, and can ensure the DHCP options for the given VPC match what’s requested'
  248. 'ec2_vpc_igw:Manage an AWS VPC Internet gateway'
  249. 'ec2_vpc_net:Configure AWS virtual private clouds'
  250. 'ec2_vpc_net_facts:Gather facts about ec2 VPCs in AWS'
  251. 'ec2_vpc_route_table:Manage route tables for AWS virtual private clouds'
  252. 'ec2_vpc_route_table_facts:Gather facts about ec2 VPC route tables in AWS'
  253. 'ec2_vpc_subnet:Manage subnets in AWS virtual private clouds'
  254. 'ec2_vpc_subnet_facts:Gather facts about ec2 VPC subnets in AWS'
  255. 'ec2_win_password:gets the default administrator password for ec2 windows instances'
  256. 'ecs_cluster:create or terminate ecs clusters'
  257. 'ecs_service:create, terminate, start or stop a service in ecs'
  258. 'ecs_service_facts:list or describe services in ecs'
  259. 'ecs_task:run, start or stop a task in ecs'
  260. 'ecs_taskdefinition:register a task definition in ecs'
  261. 'ejabberd_user:Manages users for ejabberd servers'
  262. 'elasticache:Manage cache clusters in Amazon Elasticache.'
  263. 'elasticache_subnet_group:manage Elasticache subnet groups'
  264. 'elasticsearch_plugin:Manage Elasticsearch plugins'
  265. 'eos_command:Run arbitrary command on EOS device'
  266. 'eos_config:Manage Arista EOS configuration sections'
  267. 'eos_eapi:Manage and configure EAPI. Requires EOS v4.12 or greater.'
  268. 'eos_template:Manage Arista EOS device configurations'
  269. 'expect:Executes a command and responds to prompts'
  270. 'facter:Runs the discovery program *facter* on the remote system'
  271. 'fail:Fail with custom message'
  272. 'fetch:Fetches a file from remote nodes'
  273. 'file:Sets attributes of files'
  274. 'filesystem:Makes file system on block device'
  275. 'find:return a list of files based on specific criteria'
  276. 'fireball(D):Enable fireball mode on remote node'
  277. 'firewalld:Manage arbitrary ports/services with firewalld'
  278. 'flowdock:Send a message to a flowdock'
  279. 'gc_storage:This module manages objects/buckets in Google Cloud Storage.'
  280. 'gce:create or terminate GCE instances'
  281. 'gce_img:utilize GCE image resources'
  282. 'gce_lb:create/destroy GCE load-balancer resources'
  283. 'gce_net:create/destroy GCE networks and firewall rules'
  284. 'gce_pd:utilize GCE persistent disk resources'
  285. 'gce_tag:add or remove tag(s) to/from GCE instance'
  286. 'gem:Manage Ruby gems'
  287. 'get_url:Downloads files from HTTP, HTTPS, or FTP to node'
  288. 'getent:a wrapper to the unix getent utility'
  289. 'git:Deploy software (or files) from git checkouts'
  290. 'github_hooks:Manages github service hooks.'
  291. 'glance_image(D):Add/Delete images from glance'
  292. 'gluster_volume:Manage GlusterFS volumes'
  293. 'group:Add or remove groups'
  294. 'group_by:Create Ansible groups based on facts'
  295. 'grove:Sends a notification to a channel'
  296. 'hall:Send notification to Hall'
  297. 'haproxy:Enable, disable, and set weights for HAProxy backend servers using socket commands.'
  298. 'hg:Manages Mercurial (hg) repositories.'
  299. 'hipchat:Send a message to hipchat.'
  300. 'homebrew:Package manager for Homebrew'
  301. 'homebrew_cask:Install/uninstall homebrew casks.'
  302. 'homebrew_tap:Tap a Homebrew repository.'
  303. 'hostname:Manage hostname'
  304. 'htpasswd:manage user files for basic authentication'
  305. 'iam:Manage IAM users, groups, roles and keys'
  306. 'iam_cert:Manage server certificates for use on ELBs and CloudFront'
  307. 'iam_policy:Manage IAM policies for users, groups, and roles'
  308. 'include_vars:Load variables from files, dynamically within a task.'
  309. 'ini_file:Tweak settings in INI files'
  310. 'ios_command:Run arbitrary commands on ios devices.'
  311. 'ios_config:Manage Cisco IOS configuration sections'
  312. 'ios_template:Manage Cisco IOS device configurations over SSH'
  313. 'iosxr_command:Run arbitrary commands on ios devices.'
  314. 'iosxr_config:Manage Cisco IOS XR configuration sections'
  315. 'iosxr_template:Manage Cisco IOS device configurations over SSH'
  316. 'ipify_facts:Retrieve the public IP of your internet gateway.'
  317. 'iptables:Modify the systems iptables'
  318. 'irc:Send a message to an IRC channel'
  319. 'jabber:Send a message to jabber user or chat room'
  320. 'jboss:deploy applications to JBoss'
  321. 'jira:create and modify issues in a JIRA instance'
  322. 'junos_command:Execute arbitrary commands on Juniper JUNOS devices'
  323. 'junos_config:Manage Juniper JUNOS configuration sections'
  324. 'junos_template:Manage Juniper JUNOS device configurations'
  325. 'kernel_blacklist:Blacklist kernel modules'
  326. 'keystone_user(D):Manage OpenStack Identity (keystone) users, tenants and roles'
  327. 'known_hosts:Add or remove a host from the ``known_hosts`` file'
  328. 'layman:Manage Gentoo overlays'
  329. 'librato_annotation:create an annotation in librato'
  330. 'lineinfile:Ensure a particular line is in a file, or replace an existing line using a back-referenced regular expression.'
  331. 'linode:create / delete / stop / restart an instance in Linode Public Cloud'
  332. 'lldp:get details reported by lldp'
  333. 'locale_gen:Creates or removes locales.'
  334. 'logentries:Module for tracking logs via'
  335. 'lvg:Configure LVM volume groups'
  336. 'lvol:Configure LVM logical volumes'
  337. 'lxc_container:Manage LXC Containers'
  338. 'macports:Package manager for MacPorts'
  339. 'mail:Send an email'
  340. 'maven_artifact:Downloads an Artifact from a Maven Repository'
  341. 'modprobe:Add or remove kernel modules'
  342. 'mongodb_user:Adds or removes a user from a MongoDB database.'
  343. 'monit:Manage the state of a program monitored via Monit'
  344. 'mount:Control active and configured mount points'
  345. 'mqtt:Publish a message on an MQTT topic for the IoT'
  346. 'mysql_db:Add or remove MySQL databases from a remote host.'
  347. 'mysql_replication:Manage MySQL replication'
  348. 'mysql_user:Adds or removes a user from a MySQL database.'
  349. 'mysql_variables:Manage MySQL global variables'
  350. 'nagios:Perform common tasks in Nagios related to downtime and notifications.'
  351. 'netscaler:Manages Citrix NetScaler entities'
  352. 'newrelic_deployment:Notify newrelic about app deployments'
  353. 'nexmo:Send a SMS via nexmo'
  354. 'nmcli:Manage Networking'
  355. 'nova_compute(D):Create/Delete VMs from OpenStack'
  356. 'nova_keypair(D):Add/Delete key pair from nova'
  357. 'npm:Manage node.js packages with npm'
  358. 'nxos_command:Run arbitrary command on Cisco NXOS devices'
  359. 'nxos_config:Manage Cisco NXOS configuration sections'
  360. 'nxos_nxapi:Manage NXAPI configuration on an NXOS device.'
  361. 'nxos_template:Manage Cisco NXOS device configurations'
  362. 'ohai:Returns inventory data from *Ohai*'
  363. 'open_iscsi:Manage iscsi targets with open-iscsi'
  364. 'openbsd_pkg:Manage packages on OpenBSD.'
  365. 'openvswitch_bridge:Manage Open vSwitch bridges'
  366. 'openvswitch_db:Configure open vswitch database.'
  367. 'openvswitch_port:Manage Open vSwitch ports'
  368. 'opkg:Package manager for OpenWrt'
  369. 'ops_command:Run arbitrary commands on OpenSwitch devices.'
  370. 'ops_config:Manage OpenSwitch configuration using CLI'
  371. 'ops_template:Push configuration to OpenSwitch'
  372. 'os_auth:Retrieve an auth token'
  373. 'os_client_config:Get OpenStack Client config'
  374. 'os_flavor_facts:Retrieve facts about one or more flavors'
  375. 'os_floating_ip:Add/Remove floating IP from an instance'
  376. 'os_group:Manage OpenStack Identity Groups'
  377. 'os_image:Add/Delete images from OpenStack Cloud'
  378. 'os_image_facts:Retrieve facts about an image within OpenStack.'
  379. 'os_ironic:Create/Delete Bare Metal Resources from OpenStack'
  380. 'os_ironic_node:Activate/Deactivate Bare Metal Resources from OpenStack'
  381. 'os_keypair:Add/Delete a keypair from OpenStack'
  382. 'os_keystone_domain:Manage OpenStack Identity Domains'
  383. 'os_keystone_role:Manage OpenStack Identity Roles'
  384. 'os_network:Creates/removes networks from OpenStack'
  385. 'os_networks_facts:Retrieve facts about one or more OpenStack networks.'
  386. 'os_nova_flavor:Manage OpenStack compute flavors'
  387. 'os_object:Create or Delete objects and containers from OpenStack'
  388. 'os_port:Add/Update/Delete ports from an OpenStack cloud.'
  389. 'os_project:Manage OpenStack Projects'
  390. 'os_router:Create or delete routers from OpenStack'
  391. 'os_security_group:Add/Delete security groups from an OpenStack cloud.'
  392. 'os_security_group_rule:Add/Delete rule from an existing security group'
  393. 'os_server:Create/Delete Compute Instances from OpenStack'
  394. 'os_server_actions:Perform actions on Compute Instances from OpenStack'
  395. 'os_server_facts:Retrieve facts about one or more compute instances'
  396. 'os_server_volume:Attach/Detach Volumes from OpenStack VM’s'
  397. 'os_subnet:Add/Remove subnet to an OpenStack network'
  398. 'os_subnets_facts:Retrieve facts about one or more OpenStack subnets.'
  399. 'os_user:Manage OpenStack Identity Users'
  400. 'os_user_group:Associate OpenStack Identity users and groups'
  401. 'os_volume:Create/Delete Cinder Volumes'
  402. 'osx_defaults:osx_defaults allows users to read, write, and delete Mac OS X user defaults from Ansible'
  403. 'osx_say:Makes an OSX computer to speak.'
  404. 'ovirt:oVirt/RHEV platform management'
  405. 'package:Generic OS package manager'
  406. 'pacman:Manage packages with *pacman*'
  407. 'pagerduty:Create PagerDuty maintenance windows'
  408. 'pagerduty_alert:Trigger, acknowledge or resolve PagerDuty incidents'
  409. 'pam_limits:Modify Linux PAM limits'
  410. 'patch:Apply patch files using the GNU patch tool.'
  411. 'pause:Pause playbook execution'
  412. 'pear:Manage pear/pecl packages'
  413. 'ping:Try to connect to host, verify a usable python and return ``pong`` on success.'
  414. 'pingdom:Pause/unpause Pingdom alerts'
  415. 'pip:Manages Python library dependencies.'
  416. 'pkg5:Manages packages with the Solaris 11 Image Packaging System'
  417. 'pkg5_publisher:Manages Solaris 11 Image Packaging System publishers'
  418. 'pkgin:Package manager for SmartOS, NetBSD, et al.'
  419. 'pkgng:Package manager for FreeBSD >= 9.0'
  420. 'pkgutil:Manage CSW-Packages on Solaris'
  421. 'portage:Package manager for Gentoo'
  422. 'portinstall:Installing packages from FreeBSD’s ports system'
  423. 'postgresql_db:Add or remove PostgreSQL databases from a remote host.'
  424. 'postgresql_ext:Add or remove PostgreSQL extensions from a database.'
  425. 'postgresql_lang:Adds, removes or changes procedural languages with a PostgreSQL database.'
  426. 'postgresql_privs:Grant or revoke privileges on PostgreSQL database objects.'
  427. 'postgresql_user:Adds or removes a users (roles) from a PostgreSQL database.'
  428. 'profitbricks:Create, destroy, start, stop, and reboot a ProfitBricks virtual machine.'
  429. 'profitbricks_datacenter:Create or destroy a ProfitBricks Virtual Datacenter.'
  430. 'profitbricks_nic:Create or Remove a NIC.'
  431. 'profitbricks_volume:Create or destroy a volume.'
  432. 'profitbricks_volume_attachments:Attach or detach a volume.'
  433. 'proxmox:management of instances in Proxmox VE cluster'
  434. 'proxmox_template:management of OS templates in Proxmox VE cluster'
  435. 'puppet:Runs puppet'
  436. 'pushbullet:Sends notifications to Pushbullet'
  437. 'pushover:Send notifications via https'
  438. 'quantum_floating_ip(D):Add/Remove floating IP from an instance'
  439. 'quantum_floating_ip_associate(D):Associate or disassociate a particular floating IP with an instance'
  440. 'quantum_network(D):Creates/Removes networks from OpenStack'
  441. 'quantum_router(D):Create or Remove router from openstack'
  442. 'quantum_router_gateway(D):set/unset a gateway interface for the router with the specified external network'
  443. 'quantum_router_interface(D):Attach/Dettach a subnet’s interface to a router'
  444. 'quantum_subnet(D):Add/remove subnet from a network'
  445. 'rabbitmq_binding:This module manages rabbitMQ bindings'
  446. 'rabbitmq_exchange:This module manages rabbitMQ exchanges'
  447. 'rabbitmq_parameter:Adds or removes parameters to RabbitMQ'
  448. 'rabbitmq_plugin:Adds or removes plugins to RabbitMQ'
  449. 'rabbitmq_policy:Manage the state of policies in RabbitMQ.'
  450. 'rabbitmq_queue:This module manages rabbitMQ queues'
  451. 'rabbitmq_user:Adds or removes users to RabbitMQ'
  452. 'rabbitmq_vhost:Manage the state of a virtual host in RabbitMQ'
  453. 'raw:Executes a low-down and dirty SSH command'
  454. 'rax:create / delete an instance in Rackspace Public Cloud'
  455. 'rax_cbs:Manipulate Rackspace Cloud Block Storage Volumes'
  456. 'rax_cbs_attachments:Manipulate Rackspace Cloud Block Storage Volume Attachments'
  457. 'rax_cdb:create/delete or resize a Rackspace Cloud Databases instance'
  458. 'rax_cdb_database:create / delete a database in the Cloud Databases'
  459. 'rax_cdb_user:create / delete a Rackspace Cloud Database'
  460. 'rax_clb:create / delete a load balancer in Rackspace Public Cloud'
  461. 'rax_clb_nodes:add, modify and remove nodes from a Rackspace Cloud Load Balancer'
  462. 'rax_clb_ssl:Manage SSL termination for a Rackspace Cloud Load Balancer.'
  463. 'rax_dns:Manage domains on Rackspace Cloud DNS'
  464. 'rax_dns_record:Manage DNS records on Rackspace Cloud DNS'
  465. 'rax_facts:Gather facts for Rackspace Cloud Servers'
  466. 'rax_files:Manipulate Rackspace Cloud Files Containers'
  467. 'rax_files_objects:Upload, download, and delete objects in Rackspace Cloud Files'
  468. 'rax_identity:Load Rackspace Cloud Identity'
  469. 'rax_keypair:Create a keypair for use with Rackspace Cloud Servers'
  470. 'rax_meta:Manipulate metadata for Rackspace Cloud Servers'
  471. 'rax_mon_alarm:Create or delete a Rackspace Cloud Monitoring alarm.'
  472. 'rax_mon_check:Create or delete a Rackspace Cloud Monitoring check for an existing entity.'
  473. 'rax_mon_entity:Create or delete a Rackspace Cloud Monitoring entity'
  474. 'rax_mon_notification:Create or delete a Rackspace Cloud Monitoring notification.'
  475. 'rax_mon_notification_plan:Create or delete a Rackspace Cloud Monitoring notification plan.'
  476. 'rax_network:create / delete an isolated network in Rackspace Public Cloud'
  477. 'rax_queue:create / delete a queue in Rackspace Public Cloud'
  478. 'rax_scaling_group:Manipulate Rackspace Cloud Autoscale Groups'
  479. 'rax_scaling_policy:Manipulate Rackspace Cloud Autoscale Scaling Policy'
  480. 'rds:create, delete, or modify an Amazon rds instance'
  481. 'rds_param_group:manage RDS parameter groups'
  482. 'rds_subnet_group:manage RDS database subnet groups'
  483. 'redhat_subscription:Manage Red Hat Network registration and subscriptions using the ``subscription-manager`` command'
  484. 'redis:Various redis commands, slave and flush'
  485. 'replace:Replace all instances of a particular string in a file using a back-referenced regular expression.'
  486. 'rhn_channel:Adds or removes Red Hat software channels'
  487. 'rhn_register:Manage Red Hat Network registration using the ``rhnreg_ks`` command'
  488. 'riak:This module handles some common Riak operations'
  489. 'rollbar_deployment:Notify Rollbar about app deployments'
  490. 'route53:add or delete entries in Amazons Route53 DNS service'
  491. 'route53_facts:Retrieves route53 details using AWS methods'
  492. 'route53_health_check:add or delete health-checks in Amazons Route53 DNS service'
  493. 'route53_zone:add or delete Route53 zones'
  494. 'rpm_key:Adds or removes a gpg key from the rpm db'
  495. 's3:manage objects in S3.'
  496. 's3_bucket:Manage s3 buckets in AWS'
  497. 's3_lifecycle:Manage s3 bucket lifecycle rules in AWS'
  498. 's3_logging:Manage logging facility of an s3 bucket in AWS'
  499. 'script:Runs a local script on a remote node after transferring it'
  500. 'seboolean:Toggles SELinux booleans.'
  501. 'selinux:Change policy and state of SELinux'
  502. 'selinux_permissive:Change permissive domain in SELinux policy'
  503. 'sendgrid:Sends an email with the SendGrid API'
  504. 'sensu_check:Manage Sensu checks'
  505. 'seport:Manages SELinux network port type definitions'
  506. 'service:Manage services.'
  507. 'set_fact:Set host facts from a task'
  508. 'setup:Gathers facts about remote hosts'
  509. 'shell:Execute commands in nodes.'
  510. 'slack:Send Slack notifications'
  511. 'slackpkg:Package manager for Slackware >= 12.2'
  512. 'slurp:Slurps a file from remote nodes'
  513. 'snmp_facts:Retrieve facts for a device using SNMP.'
  514. 'sns:Send Amazon Simple Notification Service (SNS) messages'
  515. 'sns_topic:Manages AWS SNS topics and subscriptions'
  516. 'solaris_zone:Manage Solaris zones'
  517. 'sqs_queue:Creates or deletes AWS SQS queues.'
  518. 'stackdriver:Send code deploy and annotation events to stackdriver'
  519. 'stat:retrieve file or file system status'
  520. 'sts_assume_role:Assume a role using AWS Security Token Service and obtain temporary credentials'
  521. 'subversion:Deploys a subversion repository.'
  522. 'supervisorctl:Manage the state of a program or group of programs running via supervisord'
  523. 'svc:Manage daemontools services.'
  524. 'svr4pkg:Manage Solaris SVR4 packages'
  525. 'swdepot:Manage packages with swdepot package manager (HP-UX)'
  526. 'synchronize:Uses rsync to make synchronizing file paths in your playbooks quick and easy.'
  527. 'sysctl:Manage entries in sysctl.conf.'
  528. 'taiga_issue:Creates/deletes an issue in a Taiga Project Management Platform'
  529. 'template:Templates a file out to a remote server.'
  530. 'twilio:Sends a text message to a mobile phone through Twilio.'
  531. 'typetalk:Send a message to typetalk'
  532. 'ufw:Manage firewall with UFW'
  533. 'unarchive:Unpacks an archive after (optionally) copying it from the local machine.'
  534. 'uptimerobot:Pause and start Uptime Robot monitoring'
  535. 'uri:Interacts with webservices'
  536. 'urpmi:Urpmi manager'
  537. 'user:Manage user accounts'
  538. 'vca_fw:add remove firewall rules in a gateway in a vca'
  539. 'vca_nat:add remove nat rules in a gateway in a vca'
  540. 'vca_vapp:Manages vCloud Air vApp instances.'
  541. 'vertica_configuration:Updates Vertica configuration parameters.'
  542. 'vertica_facts:Gathers Vertica database facts.'
  543. 'vertica_role:Adds or removes Vertica database roles and assigns roles to them.'
  544. 'vertica_schema:Adds or removes Vertica database schema and roles.'
  545. 'vertica_user:Adds or removes Vertica database users and assigns roles.'
  546. 'virt:Manages virtual machines supported by libvirt'
  547. 'virt_net:Manage libvirt network configuration'
  548. 'virt_pool:Manage libvirt storage pools'
  549. 'vmware_cluster:Create VMware vSphere Cluster'
  550. 'vmware_datacenter:Manage VMware vSphere Datacenters'
  551. 'vmware_dns_config:Manage VMware ESXi DNS Configuration'
  552. 'vmware_dvs_host:Add or remove a host from distributed virtual switch'
  553. 'vmware_dvs_portgroup:Create or remove a Distributed vSwitch portgroup'
  554. 'vmware_dvswitch:Create or remove a distributed vSwitch'
  555. 'vmware_host:Add/remove ESXi host to/from vCenter'
  556. 'vmware_migrate_vmk:Migrate a VMK interface from VSS to VDS'
  557. 'vmware_portgroup:Create a VMware portgroup'
  558. 'vmware_target_canonical_facts:Return canonical (NAA) from an ESXi host'
  559. 'vmware_vm_facts:Return basic facts pertaining to a vSphere virtual machine guest'
  560. 'vmware_vm_shell:Execute a process in VM'
  561. 'vmware_vm_vss_dvs_migrate:Migrates a virtual machine from a standard vswitch to distributed'
  562. 'vmware_vmkernel:Create a VMware VMkernel Interface'
  563. 'vmware_vmkernel_ip_config:Configure the VMkernel IP Address'
  564. 'vmware_vsan_cluster:Configure VSAN clustering on an ESXi host'
  565. 'vmware_vswitch:Add a VMware Standard Switch to an ESXi host'
  566. 'vsphere_copy:Copy a file to a vCenter datastore'
  567. 'vsphere_guest:Create/delete/manage a guest VM through VMware vSphere.'
  568. 'wait_for:Waits for a condition before continuing.'
  569. 'webfaction_app:Add or remove applications on a Webfaction host'
  570. 'webfaction_db:Add or remove a database on Webfaction'
  571. 'webfaction_domain:Add or remove domains and subdomains on Webfaction'
  572. 'webfaction_mailbox:Add or remove mailboxes on Webfaction'
  573. 'webfaction_site:Add or remove a website on a Webfaction host'
  574. 'win_acl:Set file/directory permissions for a system user or group.'
  575. 'win_chocolatey:Installs packages using chocolatey'
  576. 'win_copy:Copies files to remote locations on windows hosts.'
  577. 'win_dotnet_ngen:Runs ngen to recompile DLLs after .NET updates'
  578. 'win_environment:Modifies environment variables on windows hosts.'
  579. 'win_feature:Installs and uninstalls Windows Features'
  580. 'win_file:Creates, touches or removes files or directories.'
  581. 'win_file_version:Get DLL or EXE file build version'
  582. 'win_firewall_rule:Windows firewall automation'
  583. 'win_get_url:Fetches a file from a given URL'
  584. 'win_group:Add and remove local groups'
  585. 'win_iis_virtualdirectory:Configures a virtual directory in IIS.'
  586. 'win_iis_webapplication:Configures a IIS Web application.'
  587. 'win_iis_webapppool:Configures a IIS Web Application Pool.'
  588. 'win_iis_webbinding:Configures a IIS Web site.'
  589. 'win_iis_website:Configures a IIS Web site.'
  590. 'win_lineinfile:Ensure a particular line is in a file, or replace an existing line using a back-referenced regular expression.'
  591. 'win_msi:Installs and uninstalls Windows MSI files'
  592. 'win_nssm:NSSM '
  593. 'win_package:Installs/Uninstalls a installable package, either from local file system or url'
  594. 'win_ping:A windows version of the classic ping module.'
  595. 'win_regedit:Add, Edit, or Remove Registry Keys and Values'
  596. 'win_regmerge:Merges the contents of a registry file into the windows registry'
  597. 'win_scheduled_task:Manage scheduled tasks'
  598. 'win_service:Manages Windows services'
  599. 'win_share:Manage Windows shares'
  600. 'win_stat:returns information about a Windows file'
  601. 'win_template:Templates a file out to a remote server.'
  602. 'win_timezone:Sets Windows machine timezone'
  603. 'win_unzip:Unzips compressed files and archives on the Windows node'
  604. 'win_updates:Download and install Windows updates'
  605. 'win_uri:Interacts with webservices.'
  606. 'win_user:Manages local Windows user accounts'
  607. 'win_webpicmd:Installs packages using Web Platform Installer command-line'
  608. 'xattr:set/retrieve extended attributes'
  609. 'xenserver_facts:get facts reported on xenserver'
  610. 'yum:Manages packages with the *yum* package manager'
  611. 'yum_repository:Add and remove YUM repositories'
  612. 'zabbix_group:Zabbix host groups creates/deletes'
  613. 'zabbix_host:Zabbix host creates/updates/deletes'
  614. 'zabbix_hostmacro:Zabbix host macro creates/updates/deletes'
  615. 'zabbix_maintenance:Create Zabbix maintenance windows'
  616. 'zabbix_screen:Zabbix screen creates/updates/deletes'
  617. 'zfs:Manage zfs'
  618. 'znode:Create, delete, retrieve, and update znodes using ZooKeeper.'
  619. 'zypper:Manage packages on SUSE and openSUSE'
  620. 'zypper_repository:Add and remove Zypper repositories'
  621. )
  622. _ansible ()
  623. {
  624. local curcontext="$curcontext" state line
  625. typeset -A opt_args
  626. _arguments -C -W \
  627. '1:pattern:->pattern'\
  628. "(-a --args)"{-a,--args}"[ARGS module arguments]:arguments:(ARG)"\
  629. '--ask-become-pass[ask for privilege escalation password]'\
  630. "(-k --ask-pass)"{-k,--ask-pass}"[ask for connection password]"\
  631. '--ask-su-pass[ask for su password (deprecated, use become)]'\
  632. "(-K --ask-sudo-pass)"{-K,--ask-sudo-pass}"[ask for sudo password (deprecated, use become)]"\
  633. '--ask-vault-pass[ask for vault password]'\
  634. "(-B --background)"{-B,--background}"[DURATION run asynchronously for DURATION (s)]:duration:(DURATION)"\
  635. "(-b --become)"{-b,--become}"[run operations with become (nopasswd implied)]"\
  636. '--become-method[privilege escalation method to use (default=sudo)]:method:(sudo su pbrun pfexec runas doas)'\
  637. '--become-user[run operations as this user (default=root)]:user:(USER)'\
  638. "(-C --check)"{-C,--check}"[don't make any changes]"\
  639. "(-c --connection)"{-c,--connection}"[CONNECTION connection type to use (default=smart)]:connection type:(smart ssh local chroot)"\
  640. "(-D --diff)"{-D,--diff}"[show differences when changing (small) files and templates]"\
  641. "(-e --extra-vars)"{-e,--extra-vars}"[set additional variables as key=value or YAML/JSON]"\
  642. "(-f --forks)"{-f,--forks}"[FORKS number of parallel processes to use (default=5)]:forks:(5)"\
  643. "(-h --help)"{-h,--help}"[help message]"\
  644. "(-i --inventory-file)"{-i,--inventory-file}"[INVENTORY specify inventory host file]:inventory file:_files"\
  645. "(-l --limit)"{-l,--limit}"[SUBSET further limit selected hosts to an additional pattern]:subset pattern:->pattern"\
  646. '--list-hosts[outputs a list of matching hosts. Does not execute anything else]'\
  647. "(-m --module-name)"{-m,--module-name}"[MODULE_NAME module name (default=command)]:module name:->module"\
  648. "(-M --module-path)"{-M,--module-path}"[MODULE_PATH specify path to module library (default=None)]:module path:_files -/"\
  649. '--new-vault-password-file[new vault password file for rekey]:new vault password file:_files'\
  650. "(-o --one-line)"{-o,--one-line}"[condense output]"\
  651. '--output[output file name for encrypt or decrypt; use - for stdout]:output file:_files'\
  652. "(-P --poll)"{-P,--poll}"[POLL_INTERVAL set the poll interval (s) if using -B (default=15)]:poll interval:(15)"\
  653. '--private-key[PRIVATE_KEY_FILE use this file to authenticate the connection]:private key file:_files'\
  654. '--scp-extra-args[specify extra arguments to pass to scp only]'\
  655. '--sftp-extra-args[specify extra arguments to pass to sftp only]'\
  656. '--ssh-common-args[specify common arguments to pass to sftp/scp/ssh]'\
  657. '--ssh-extra-args[specify extra arguments to pass to ssh only]'\
  658. "(-S --su)"{-S,--su}"[run operations with su (deprecated, use become)]"\
  659. "(-R --su-user)"{-R,--su-user}"[SU_USER run operations with su as this user (default=root) (deprecated, use become)]:su user:(root)"\
  660. "(-s --sudo)"{-s,--sudo}"[run operations with sudo (nopasswd) (deprecated, use become)]"\
  661. "(-U --sudo-user)"{-U,--sudo-user}"[SUDO_USER desired sudo user (default=root) (deprecated, use become)]:su user:(root)"\
  662. '--syntax-check[perform a syntax check on the playbook, but do not execute it]'\
  663. "(-T --timeout)"{-T,--timeout}"[TIMEOUT override the SSH timeout (s) (default=10)]:ssh timeout:(10)"\
  664. "(-t --tree)"{-t,--tree}"[OUTPUT_DIRECTORY log output to this directory]:output directory:_files -/"\
  665. "(-u --user)"{-u,--user}"[REMOTE_USER connect as this user (default=${USER})]:connect as user:(${USER})"\
  666. "--vault-password-file[VAULT_PASSWORD_FILE vault password file]:vault password file:_files"\
  667. "(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]"\
  668. "--version[show program's version number and exit]"\
  669. case $state in
  670. pattern)
  671. _arguments '*:feature:__host_list'
  672. _arguments '*:feature:__group_list'
  673. ;;
  674. module)
  675. _describe -t commands "modules" _modules
  676. ;;
  677. esac
  678. }
  679. _ansible "$@"
  680. # Local Variables:
  681. # mode: Shell-Script
  682. # sh-indentation: 2
  683. # indent-tabs-mode: nil
  684. # sh-basic-offset: 2
  685. # End:
  686. # vim: ft=zsh sw=2 ts=2 et