3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ansible 2.2 の新モジュール、新オプション一覧

Posted at

以前投稿した Ansible 2.0 の新モジュール、新オプション一覧 の Ansible 2.2 版です。Ansible 2.2 の CHANGELOG と合わせてご参考ください。

Modules added in version 2.2

Cloud Modules

Database Modules

Files Modules

Identity Modules

Monitoring Modules

Network Modules

Notification Modules

Packaging Modules

Remote Management Modules

Source Control Modules

Storage Modules

System Modules

Univention Modules

Utilities Modules

Web Infrastructure Modules

Windows Modules

Options added in version 2.2

Cloud Modules

Clustering Modules

  • consul_session (E) - manipulate consul sessions
    • behavior: the optional behavior that can be attached to the session when it is created. This can be set to either ‘release’ or ‘delete’. This controls the behavior when a session is invalidated.

Database Modules

Files Modules

  • assemble - Assembles a configuration file from fragments
    • unsafe_writes: Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, they cannot be updated atomically and can only be done in an unsafe manner.This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
  • blockinfile (E) - Insert/update/remove a text block surrounded by marker lines.
    • unsafe_writes: Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, they cannot be updated atomically and can only be done in an unsafe manner.This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
  • copy - Copies files to remote locations.
    • unsafe_writes: Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, they cannot be updated atomically and can only be done in an unsafe manner.This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
  • file - Sets attributes of files
    • unsafe_writes: Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, they cannot be updated atomically and can only be done in an unsafe manner.This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
  • ini_file - Tweak settings in INI files
    • create: If specified, the file will be created if it does not already exist. By default it will fail if the file is missing.
    • unsafe_writes: Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, they cannot be updated atomically and can only be done in an unsafe manner.This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
  • lineinfile - Ensure a particular line is in a file, or replace an existing line using a back-referenced regular expression.
    • unsafe_writes: Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, they cannot be updated atomically and can only be done in an unsafe manner.This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
  • replace - Replace all instances of a particular string in a file using a back-referenced regular expression.
    • unsafe_writes: Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, they cannot be updated atomically and can only be done in an unsafe manner.This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
  • template - Templates a file out to a remote server.
    • unsafe_writes: Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, they cannot be updated atomically and can only be done in an unsafe manner.This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
  • unarchive - Unpacks an archive after (optionally) copying it from the local machine.
    • remote_src: Set to yes to indicate the archived file is already on the remote system and not local to the Ansible controller.This option is mutually exclusive with copy.
    • unsafe_writes: Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, they cannot be updated atomically and can only be done in an unsafe manner.This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
    • validate_certs: This only applies if using a https url as the source of the file.This should only set to no used on personally controlled sites using self-signed cerPrior to 2.2 the code worked as if this was set to yes.

Monitoring Modules

Network Modules

  • a10_virtual_server (E) - Manage A10 Networks devices’ virtual servers
    • validate_certs: If no, SSL certificates will not be validated. This should only be used on personally controlled devices using self-signed certificates.
    • write_config: If yes, any changes will cause a write of the running configuration to non-volatile memory. This will save all configuration changes, including those that may have been made manually or through other modules, so care should be taken when specifying yes.
  • a10_service_group (E) - Manage A10 Networks devices’ service groups
    • validate_certs: If no, SSL certificates will not be validated. This should only be used on personally controlled devices using self-signed certificates.
    • write_config: If yes, any changes will cause a write of the running configuration to non-volatile memory. This will save all configuration changes, including those that may have been made manually or through other modules, so care should be taken when specifying yes.
  • a10_server (E) - Manage A10 Networks AX/SoftAX/Thunder/vThunder devices
    • validate_certs: If no, SSL certificates will not be validated. This should only be used on personally controlled devices using self-signed certificates.
    • write_config: If yes, any changes will cause a write of the running configuration to non-volatile memory. This will save all configuration changes, including those that may have been made manually or through other modules, so care should be taken when specifying yes.
  • bigip_facts (E) - Collect facts from F5 BIG-IP devices
    • server_port: The BIG-IP server port.
  • bigip_gtm_facts (E) - Collect facts from F5 BIG-IP GTM devices.
    • server_port: The BIG-IP server port.
  • bigip_gtm_wide_ip (E) - Manages F5 BIG-IP GTM wide ip
    • server_port: The BIG-IP server port.
  • bigip_hostname (E) - Manage the hostname of a BIG-IP.
    • server_port: The BIG-IP server port.
  • bigip_monitor_tcp (E) - Manages F5 BIG-IP LTM tcp monitors
    • server_port: The BIG-IP server port.
  • bigip_monitor_http (E) - Manages F5 BIG-IP LTM http monitors
    • server_port: The BIG-IP server port.
  • bigip_pool (E) - Manages F5 BIG-IP LTM pools
    • reselect_tries: Sets the number of times the system tries to contact a pool member after a passive failure
    • server_port: The BIG-IP server port.
  • bigip_node (E) - Manages F5 BIG-IP LTM nodes
    • monitor_type: Monitor rule type when monitors > 1
    • monitors: Monitor template name list. Always use the full path to the monitor.
    • quorum: Monitor quorum value when monitor_type is m_of_n
    • server_port: The BIG-IP server port.
  • bigip_pool_member (E) - Manages F5 BIG-IP LTM pool members
    • server_port: The BIG-IP server port.
  • bigip_snat_pool (E) - Manage SNAT pools on a BIG-IP.
    • server_port: The BIG-IP server port.
  • bigip_sys_global (E) - Manage BIG-IP global settings.
    • server_port: The BIG-IP server port.
  • bigip_virtual_server (E) - Manages F5 BIG-IP LTM virtual servers
    • all_rules: List of rules to be applied in priority order
    • enabled_vlans: List of vlans to be enabled. When a VLAN named ALL is used, all VLANs will be allowed.
    • server_port: The BIG-IP server port.
  • eos_command - Run arbitrary commands on an Arista EOS device
    • match: The match argument is used in conjunction with the wait_for argument to specify the match policy. Valid values are all or any. If the value is set to all then all conditionals in the wait_for must be satisfied. If the value is set to any then only one of the values must be satisfied.
    • wait_for: Specifies what to evaluate from the output of the command and what conditionals to apply. This argument will cause the task to wait for a particular conditional to be true before moving forward. If the conditional is not true by the configured retries, the task fails. See examples.
      aliases: waitfor
  • eos_config - Manage Arista EOS configuration sections
    • backup: This argument will cause the module to create a full backup of the current running-config from the remote device before any changes are made. The backup file is written to the backup folder in the playbook root directory. If the directory does not exist, it is created.
    • defaults: The defaults argument will influence how the running-config is collected from the device. When the value is set to true, the command used to collect the running-config is append with the all keyword. When the value is set to false, the command is issued without the all keyword
    • save: The save argument instructs the module to save the running-config to startup-config. This operation is performed after any changes are made to the current running config. If no changes are made, the configuration is still saved to the startup config. This option will always cause the module to return changed.
    • src: The src argument provides a path to the configuration file to load into the remote system. The path can either be a full system path to the configuration file if the value starts with / or relative to the root of the implemented role or playbook. This argument is mutually exclusive with the lines and parents arguments.
  • eos_eapi - Manage and configure Arista EOS eAPI.
    • config: The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The config argument allows the implementer to pass in the configuration to use as the base config for comparison.
    • vrf: The vrf argument will configure eAPI to listen for connections in the specified VRF. By default, eAPI transports will listen for connections in the global table. This value requires the VRF to already be created otherwise the task will fail.
  • get_url - Downloads files from HTTP, HTTPS, or FTP to node
    • unsafe_writes: Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, they cannot be updated atomically and can only be done in an unsafe manner.This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
  • haproxy (E) - Enable, disable, and set weights for HAProxy backend servers using socket commands.
    • fail_on_not_found: Fail whenever trying to enable/disable a backend host that does not exist
  • ios_command - Run commands on remote devices running Cisco IOS
    • match: The match argument is used in conjunction with the wait_for argument to specify the match policy. Valid values are all or any. If the value is set to all then all conditionals in the wait_for must be satisfied. If the value is set to any then only one of the values must be satisfied.
    • wait_for: List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples.
      aliases: waitfor
  • ios_config - Manage Cisco IOS configuration sections
    • backup: This argument will cause the module to create a full backup of the current running-config from the remote device before any changes are made. The backup file is written to the backup folder in the playbook root directory. If the directory does not exist, it is created.
    • config: The config argument allows the playbook designer to supply the base configuration to be used to validate configuration changes necessary. If this argument is provided, the module will not download the running-config from the remote node.
    • defaults: This argument specifies whether or not to collect all defaults when getting the remote device running config. When enabled, the module will get the current config by issuing the command show running-config all.
    • save: The save argument instructs the module to save the running- config to the startup-config at the conclusion of the module running. If check mode is specified, this argument is ignored.
    • src: Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with lines.
  • iosxr_command - Run commands on remote devices running Cisco iosxr
    • match: The match argument is used in conjunction with the wait_for argument to specify the match policy. Valid values are all or any. If the value is set to all then all conditionals in the wait_for must be satisfied. If the value is set to any then only one of the values must be satisfied.
    • wait_for: List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples.
      aliases: waitfor
  • iosxr_config - Manage Cisco IOS XR configuration sections
    • backup: This argument will cause the module to create a full backup of the current running-config from the remote device before any changes are made. The backup file is written to the backup folder in the playbook root directory. If the directory does not exist, it is created.
    • comment: Allows a commit description to be specified to be included when the configuration is committed. If the configuration is not changed or committed, this argument is ignored.
    • force: The force argument instructs the module to not consider the current devices running-config. When set to true, this will cause the module to push the contents of src into the device without first checking if already configured.Note this argument should be considered deprecated. To achieve the equivalent, set the match=none which is idempotent. This argument will be removed in a future release.
    • src: Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with lines.
  • junos_command - Execute arbitrary commands on a remote device running Junos
    • match: The match argument is used in conjunction with the wait_for argument to specify the match policy. Valid values are all or any. If the value is set to all then all conditionals in the wait_for must be satisfied. If the value is set to any then only one of the values must be satisfied.
    • wait_for: Specifies what to evaluate from the output of the command and what conditionals to apply. This argument will cause the task to wait for a particular conditional to be true before moving forward. If the conditional is not true by the configured retries, the task fails. See examples.
      aliases: waitfor
  • junos_config - Manage configuration on devices running Juniper JUNOS
    • backup: This argument will cause the module to create a full backup of the current running-config from the remote device before any changes are made. The backup file is written to the backup folder in the playbook root directory. If the directory does not exist, it is created.
    • src: The src argument provides a path to the configuration file to load into the remote system. The path can either be a full system path to the configuration file if the value starts with / or relative to the root of the implemented role or playbook. This argument is mutually exclusive with the lines argument.
    • src_format: The src_format argument specifies the format of the configuration found int src. If the src_format argument is not provided, the module will attempt to determine the format of the configuration file specified in src.
  • junos_netconf - Configures the Junos Netconf system service
    • netconf_port: This argument specifies the port the netconf service should listen on for SSH connections. The default port as defined in RFC 6242 is 830.
      aliases: listens_on
  • junos_template - Manage configuration on remote devices running Junos
    • action: The action argument specifies how the module will apply changes.
  • nxos_command - Run arbitrary command on Cisco NXOS devices
    • match: The match argument is used in conjunction with the wait_for argument to specify the match policy. Valid values are all or any. If the value is set to all then all conditionals in the wait_for must be satisfied. If the value is set to any then only one of the values must be satisfied.
    • wait_for: Specifies what to evaluate from the output of the command and what conditionals to apply. This argument will cause the task to wait for a particular conditional to be true before moving forward. If the conditional is not true by the configured retries, the task fails. See examples.
      aliases: waitfor
  • nxos_config - Manage Cisco NXOS configuration sections
    • backup: This argument will cause the module to create a full backup of the current running-config from the remote device before any changes are made. The backup file is written to the backup folder in the playbook root directory. If the directory does not exist, it is created.
    • defaults: The defaults argument will influence how the running-config is collected from the device. When the value is set to true, the command used to collect the running-config is append with the all keyword. When the value is set to false, the command is issued without the all keyword
    • save: The save argument instructs the module to save the running-config to startup-config. This operation is performed after any changes are made to the current running config. If no changes are made, the configuration is still saved to the startup config. This option will always cause the module to return changed.
    • src: The src argument provides a path to the configuration file to load into the remote system. The path can either be a full system path to the configuration file if the value starts with / or relative to the root of the implemented role or playbook. This argument is mutually exclusive with the lines and parents arguments.
  • nxos_facts - Gets facts about NX-OS switches
    • gather_subset: When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, legacy, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial ! to specify that a specific subset should not be collected.
  • nxos_interface - Manages physical attributes of interfaces.
    • fabric_forwarding_anycast_gateway: Associate SVI with anycast gateway under VLAN configuration mode.
    • interface_type: Interface type to be unconfigured from the device.
    • ip_forward: Enable/Disable ip forward feature on SVIs.
  • nxos_nxapi - Manage NXAPI configuration on an NXOS device.
    • config: The config argument provides an optional argument to specify the device running-config to used as the basis for configuring the remote system. The config argument accepts a string value that represents the device configuration.
  • nxos_switchport - Manages Layer 2 switchport interfaces.
    • trunk_allowed_vlans: if mode=trunk, these are the only VLANs that will be configured on the trunk, i.e. "2-10,15".
  • nxos_vlan - Manages VLAN resources and attributes.
    • mapped_vni: The Virtual Network Identifier (VNI) ID that is mapped to the VLAN. Valid values are integer and keyword 'default'.
  • nxos_vrf - Manages global VRF configuration.
    • route_distinguisher: VPN Route Distinguisher (RD). Valid values are a string in one of the route-distinguisher formats (ASN2:NN, ASN4:NN, or IPV4:NN); the keyword 'auto', or the keyword 'default'.
    • vni: Specify virtual network identifier. Valid values are Integer or keyword 'default'.
  • nxos_vrrp - Manages VRRP configuration on NX-OS switches.
    • admin_state: Used to enable or disable the VRRP process.
  • openvswitch_port (E) - Manage Open vSwitch ports
    • tag: VLAN tag for this port
  • ops_command - Run arbitrary commands on OpenSwitch devices.
    • match: The match argument is used in conjunction with the wait_for argument to specify the match policy. Valid values are all or any. If the value is set to all then all conditionals in the wait_for must be satisfied. If the value is set to any then only one of the values must be satisfied.
    • wait_for: List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples.
      aliases: waitfor
  • ops_config - Manage OpenSwitch configuration using CLI
    • save: The save argument instructs the module to save the running- config to the startup-config at the conclusion of the module running. If check mode is specified, this argument is ignored.
    • src: The src argument provides a path to the configuration file to load into the remote system. The path can either be a full system path to the configuration file if the value starts with / or relative to the root of the implemented role or playbook. This argument is mutually exclusive with the lines and parents arguments.
  • ops_facts - Collect device specific facts from OpenSwitch
    • gather_subset: When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, legacy, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial ! to specify that a specific subset should not be collected.

Notification Modules

  • sendgrid (E) - Sends an email with the SendGrid API
    • api_key: sendgrid API key to use instead of username/password
    • attachments: a list of relative or explicit paths of files you want to attach (7MB limit as per SendGrid docs)
    • bcc: a list of email addresses to bcc
    • cc: a list of email addresses to cc
    • from_name: the name you want to appear in the from field, i.e 'John Doe'
    • headers: a dict to pass on as headers
    • html_body: whether the body is html content that should be rendered

Packaging Modules

  • gem - Manage Ruby gems
    • env_shebang: Rewrite the shebang line on installed scripts to use /usr/bin/env.
  • homebrew_cask (E) - Install/uninstall homebrew casks.
    • install_options: options flags to install a package
      aliases: options
    • update_homebrew: update homebrew itself first. Note that brew cask update is a synonym for brew update.
      aliases: update-brew
  • homebrew_tap (E) - Tap a Homebrew repository.
    • url: The optional git URL of the repository to tap. The URL is not assumed to be on GitHub, and the protocol doesn't have to be HTTP. Any location and protocol that git can handle is fine.
  • pkgng (E) - Package manager for FreeBSD >= 9.0
    • autoremove: Remove automatically installed packages which are no longer needed.
  • redhat_subscription - Manage registration and subscriptions to RHSM using the subscription-manager command
    • environment: Register with a specific environment in the destination org. Used with Red Hat Satellite 6.x or Katello
    • force_register: Register the system even if it is already registered
  • yum_repository (E) - Add and remove YUM repositories
    • unsafe_writes: Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files, they cannot be updated atomically and can only be done in an unsafe manner.This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
  • zypper_repository (E) - Add and remove Zypper repositories
    • auto_import_keys: Automatically import the gpg signing key of the new or changed repository.Has an effect only if state is present. Has no effect on existing (unchanged) repositories or in combination with absent.Implies runrefresh.
    • enabled: Set repository to enabled (or disabled).
    • runrefresh: Refresh the package list of the given repository.Can be used with repo=* to refresh all repositories.
  • zypper (E) - Manage packages on SUSE and openSUSE
    • force: Adds --force option to zypper. Allows to downgrade packages and change vendor or architecture.
    • oldpackage: Adds --oldpackage option to zypper. Allows to downgrade packages with less side-effects than force. This is implied as soon as a version is specified as part of the package name.
    • update_cache: Run the equivalent of zypper refresh before the operation.
      aliases: refresh

Source Control Modules

System Modules

  • alternatives (E) - Manages alternative programs for common commands
    • priority: The priority of the alternative
  • gluster_volume (E) - Manage GlusterFS volumes
    • disperses: Disperse count for volume
    • redundancies: Redundancy count for volume
  • iptables (E) - Modify the systems iptables
    • action: Whether the rule should be appended at the bottom or inserted at the top. If the rule already exists the chain won't be modified.
    • flush: Flushes the specified table and chain of all rules. If no chain is specified then the entire table is purged. Ignores all other parameters.
    • icmp_type: This allows specification of the ICMP type, which can be a numeric ICMP type, type/code pair, or one of the ICMP type names shown by the command 'iptables -p icmp -h'
    • policy: Set the policy for the chain to the given target. Valid targets are ACCEPT, DROP, QUEUE, RETURN. Only built in chains can have policies. This parameter requires the chain parameter. Ignores all other parameters.
    • to_source: This specifies a source address to use with SNAT: without this, the source address is never altered.
  • lvol (E) - Configure LVM logical volumes
    • active: Whether the volume is activate and visible to the host.
    • pvs: Comma separated list of physical volumes e.g. /dev/sda,/dev/sdb
    • shrink: shrink if current size is higher than size requested
  • mount - Control active and configured mount points
    • boot: Determines if the filesystem should be mounted on boot.Only applies to Solaris systems.
  • setup - Gathers facts about remote hosts
    • gather_timeout: Set the default timeout in seconds for individual fact gathering

Utilities Modules

  • include_vars - Load variables from files, dynamically within a task.
    • file: The file name from which variables should be loaded.If the path is relative, it will look for the file in vars/ subdirectory of a role or relative to playbook.
    • name: The name of a variable into which assign the included vars, if omitted (null) they will be made top level vars.

Windows Modules

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?