Ansible-常用命令、文件、加密模块


Commands modules

  • command – Execute commands on targets
  • expect – Executes a command and responds to prompts
  • psexec – Runs commands on a remote Windows host based on the PsExec model
  • raw – Executes a low-down and dirty command
  • script – Runs a local script on a remote node after transferring it
  • shell – Execute shell commands on targets
  • telnet – Executes a low-down and dirty telnet command

Files modules

  • acl – Set and retrieve file ACL information
  • archive – Creates a compressed archive of one or more files or trees
  • assemble – Assemble configuration files from fragments
  • blockinfile – Insert/update/remove a text block surrounded by marker lines
  • copy – Copy files to remote locations
  • fetch – Fetch files from remote nodes
  • file – Manage files and file properties
  • find – Return a list of files based on specific criteria
  • ini_file – Tweak settings in INI files
  • iso_extract – Extract files from an ISO image
  • lineinfile – Manage lines in text files
  • patch – Apply patch files using the GNU patch tool
  • read_csv – Read a CSV file
  • replace – Replace all instances of a particular string in a file using a back-referenced regular expression
  • stat – Retrieve file or file system status
  • synchronize – A wrapper around rsync to make common tasks in your playbooks quick and easy
  • tempfile – Creates temporary files and directories
  • template – Template a file out to a remote server
  • unarchive – Unpacks an archive after (optionally) copying it from the local machine
  • xattr – Manage user defined extended attributes
  • xml – Manage bits and pieces of XML files or strings

Crypto modules

  • certificate_complete_chain – Complete certificate chain given a set of untrusted and root certificates
  • get_certificate – Get a certificate from a host:port
  • luks_device – Manage encrypted (LUKS) devices
  • openssh_cert – Generate OpenSSH host or user certificates
  • openssh_keypair – Generate OpenSSH private and public keys
  • openssl_certificate – Generate and/or check OpenSSL certificates
  • openssl_certificate_info – Provide information of OpenSSL X.509 certificates
  • openssl_csr – Generate OpenSSL Certificate Signing Request (CSR)
  • openssl_csr_info – Provide information of OpenSSL Certificate Signing Requests (CSR)
  • openssl_dhparam – Generate OpenSSL Diffie-Hellman Parameters
  • openssl_pkcs12 – Generate OpenSSL PKCS#12 archive
  • openssl_privatekey – Generate OpenSSL private keys
  • openssl_privatekey_info – Provide information for OpenSSL private keys
  • openssl_publickey – Generate an OpenSSL public key from its private key