LoginSignup
5
5

More than 5 years have passed since last update.

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

Last updated at Posted at 2017-06-19

以前投稿した Ansible 2.0 の新モジュール、新オプション一覧 の Ansible 2.3 版です。

Ansible 2.3 は 2017-04-12 に出ているので、かなり今更ですが……。Ansible 2.3 の CHANGELOG と合わせてご覧ください。

なお、今回は、以下のページで、オプションの説明が長すぎるせいか、パースがうまくいかない部分がありました。そこは手作業で編集しました。

あとは、Network Modules の NX-OS 関係のモジュールで、timeout パラメータのみの追加が多かったので、そこも手作業で少し削りました。このあたり、今後はもう少しスクリプトを改善して自動化したいところです。

Modules added in version 2.3

Cloud Modules

Clustering Modules

Crypto Modules

Database Modules

Files Modules

Identity Modules

Monitoring Modules

Net Tools Modules

Network Modules

Notification Modules

Packaging Modules

Remote Management Modules

Storage Modules

System Modules

Utilities Modules

Web Infrastructure Modules

Windows Modules

Options added in version 2.3

Cloud Modules

  • cloudformation - Create or delete an AWS CloudFormation stack
  • cs_iso - Manages ISO images on Apache CloudStack based clouds.
    • poll_async: Poll async jobs until job has finished.
  • cs_portforward - Manages port forwarding rules on Apache CloudStack based clouds.
    • network: Name of the network.
    • vpc: Name of the VPC.
  • cs_snapshot_policy - Manages volume snapshot policies on Apache CloudStack based clouds.
    • device_id: ID of the device on a VM the volume is attached to.This will only be considered if VM has multiple DATADISK volumes.
    • vm: Name of the instance to select the volume from.Use volume_type if VM has a DATADISK and ROOT volume.In case of volume_type=DATADISK, additionally use device_id if VM has more than one DATADISK volume.Either volume or vm is required.
    • volume_type: Type of the volume.
    • vpc: Name of the vpc the instance is deployed in.
  • cs_staticnat - Manages static NATs on Apache CloudStack based clouds.
    • vpc: VPC the network related to.
  • docker_login - Log into a Docker registry.
    • state: This controls the current state of the user. present will login in a user, absent will log him out.To logout you only need the registry server, which defaults to DockerHub.Before 2.1 you could ONLY log in.docker does not support 'logout' with a custom config file.
  • ec2_ami - create or destroy an image in ec2
    • architecture: The target architecture of the image to register
    • kernel_id: The target kernel id of the image to register
    • root_device_name: The root device name of the image to register
    • virtualization_type: The virtualization type of the image to register
  • dynamodb_table - Create, update or delete AWS Dynamo DB tables.
    • tags: a hash/dictionary of tags to add to the new instance or for starting/stopping instance by tag; '{"key":"value"}' and '{"key":"value","key":"value"}'
    • wait_for_active_timeout: how long before wait gives up, in seconds. only used when tags is set
  • ec2_ami_find - Searches for AMIs to obtain the AMI ID and other information
    • product_code: Marketplace product code to match.
  • ec2_asg - Create or delete AWS Autoscaling Groups
    • placement_group: Physical location of your cluster placement group created in Amazon EC2.
    • suspend_processes: A list of scaling processes to suspend.
  • ec2_eip - manages EC2 elastic IP (EIP) addresses.
    • private_ip_address: The primary or secondary private IP address to associate with the Elastic IP address.
  • ec2_key - maintain an ec2 key pair.
    • force: Force overwrite of already existing key pair if key has changed.
  • ec2_lc - Create or delete AWS Autoscaling Launch Configurations
    • user_data_path: Path to the file that contains userdata for the ec2 instances. Mutually exclusive with user_data.
  • ec2_vol - create and attach a volume, return volume id and device map
    • kms_key_id: Specify the id of the KMS key to use.
    • tags: tag:value pairs to add to the volume after creation
  • ec2_vpc_route_table - Manage route tables for AWS virtual private clouds
    • purge_routes: Purge existing routes that are not found in routes.
    • purge_subnets: Purge existing subnets that are not found in subnets.
  • ecs_service - create, terminate, start or stop a service in ecs
    • deployment_configuration: Optional parameters that control the deployment_configuration; format is '{"maximum_percent":, "minimum_healthy_percent":}
  • ecs_taskdefinition - register a task definition in ecs
    • network_mode: The Docker networking mode to use for the containers in the task.
    • task_role_arn: The Amazon Resource Name (ARN) of the IAM role that containers in this task can assume. All containers in this task are granted the permissions that are specified in this role.
  • gce - create or terminate GCE instances
    • disk_size: The size of the boot disk created for this instance (in GB)
    • num_instances: can be used with 'name', specifies the number of nodes to provision using 'name' as a base name
  • gce_mig - Create, Update or Destroy a Managed Instance Group (MIG).
    • named_ports: Define named ports that backend services can forward data to. Format is a a list of name:port dictionaries.
  • gce_pd - utilize GCE persistent disk resources
    • delete_on_termination: If yes, deletes the volume when instance is terminated
  • gce_tag - add or remove tag(s) to/from GCE instances
    • instance_pattern: The pattern of GCE instance names to match for adding/removing tags. Full-Python regex is supported. See https://docs.python.org/2/library/re.html for details. If instance_name is not specified, this field is required.
  • lambda - Manage AWS Lambda functions
    • dead_letter_arn: The parent object that contains the target Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
    • environment_variables: A dictionary of environment variables the Lambda function is given. aliases: environment
  • linode - create / delete / stop / restart an instance in Linode Public Cloud

    • additional_disks: List of dictionaries for creating additional disks that are added to the Linode configuration settings. Dictionary takes Size, Label, Type. Size is in MB.
    • alert_bwin_enabled: Set status of bandwidth in alerts.
    • alert_bwin_threshold: Set threshold in MB of bandwidth in alerts.
    • alert_bwout_enabled: Set status of bandwidth out alerts.
    • alert_bwout_threshold: Set threshold in MB of bandwidth out alerts.
    • alert_bwquota_enabled: Set status of bandwidth quota alerts as percentage of network tranfer quota.
    • alert_bwquota_threshold: Set threshold in MB of bandwidth quota alerts.
    • alert_cpu_enabled: Set status of receiving CPU usage alerts.
    • alert_cpu_threshold: Set percentage threshold for receiving CPU usage alerts. Each CPU core adds 100% to total.
    • alert_diskio_enabled: Set status of receiving disk IO alerts.
    • alert_diskio_threshold: Set threshold for average IO ops/sec over 2 hour period.
    • backupweeklyday: Integer value for what day of the week to store weekly backups.
    • displaygroup: Add the instance to a Display Group in Linode Manager
    • private_ip: Add private IPv4 address when Linode is created.
  • os_flavor_facts - Retrieve facts about one or more flavors

    • ephemeral: A string used for filtering flavors based on the amount of ephemeral storage. Format is the same as the ram parameter
  • os_floating_ip - Add/Remove floating IP from an instance

    • nat_destination: The name or id of a neutron private network that the fixed IP to attach floating IP is on aliases: fixed_network, internal_network
  • os_group - Manage OpenStack Identity Groups

    • domain_id: Domain id to create the group in if the cloud supports domains.
  • os_nova_flavor - Manage OpenStack compute flavors

    • extra_specs: Metadata dictionary
  • os_server_actions - Perform actions on Compute Instances from OpenStack

    • image: Image the server should be rebuilt with
  • os_user - Manage OpenStack Identity Users

    • update_password: always will attempt to update password. on_create will only set the password for newly created users.
  • os_volume - Create/Delete Cinder Volumes

    • volume: Volume name or id to create from
  • ovirt_disks - Module to manage Virtual Machine and floating disks in oVirt/RHV

    • download_image_path: Path on a file system where disk should be downloaded.Note that you must have an valid oVirt/RHV engine CA in your system trust store or you must provide it in ca_file parameter.Note that the disk is not downloaded when the file already exists, but you can forcibly download the disk when using force I (true).
    • fetch_nested: If True the module will fetch additional data from the API.It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying nested_attributes.
    • force: Please take a look at image_path documentation to see the correct usage of this parameter.
    • nested_attributes: Specifies list of the attributes which should be fetched from the API.This parameter apply only when fetch_nested is true.
    • storage_domains: Storage domain names where disk should be copied.
    • upload_image_path: Path to disk image, which should be uploaded.
  • ovirt_vms - Module to manage Virtual Machines in oVirt/RHV

    • cloud_init_nics: List of dictionaries representing network interafaces to be setup by cloud init.
    • comment: Comment of the Virtual Machine.
    • description: Description of the Virtual Machine.
    • fetch_nested: If True the module will fetch additional data from the API.It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying nested_attributes.
    • initrd_path: Path to an initial ramdisk to be used with the kernel specified by kernel_path option.Ramdisk image must be stored on either the ISO domain or on the host's storage.
    • instance_type: Name of virtual machine's hardware configuration.By default no instance type is used.
    • kernel_params: Kernel command line parameters (formatted as string) to be used with the kernel specified by kernel_path option.
    • kernel_path: Path to a kernel image used to boot the virtual machine.Kernel image must be stored on either the ISO domain or on the host's storage.
    • kvm: Dictionary of values to be used to connect to kvm and import a virtual machine to oVirt.
    • nested_attributes: Specifies list of the attributes which should be fetched from the API.This parameter apply only when fetch_nested is true.
    • serial_policy: Specify a serial number policy for the Virtual Machine.Following options are supported:vm - Sets the Virtual Machine's UUID as its serial number.host - Sets the host's UUID as the Virtual Machine's serial number.custom - Allows you to specify a custom serial number in serial_policy_value.
    • serial_policy_value: Allows you to specify a custom serial number.This parameter is used only when serial_policy is custom.
    • template_version: Version number of the template to be used for VM.By default the latest available version of the template is used.
    • timezone: Sets time zone offset of the guest hardware clock.For example: Etc/GMT
    • use_latest_template_version: Specify if latest template version should be used, when running a stateless VM.If this parameter is set to true stateless VM is created.
    • vmware: Dictionary of values to be used to connect to VMware and import a virtual machine to oVirt.
    • xen: Dictionary of values to be used to connect to XEN and import a virtual machine to oVirt.
  • proxmox - management of instances in Proxmox VE cluster

    • pool: Proxmox VE resource pool
    • pubkey: Public key to add to /root/.ssh/authorized_keys. This was added on Proxmox 4.2, it is ignored for earlier versions
    • unprivileged: Indicate if the container should be unprivileged
  • s3 - manage objects in S3.

    • ignore_nonexistent_bucket: Overrides initial bucket lookups in case bucket or iam policies are restrictive. Example: a user may have the GetObject permission but no other permissions. In this case using the option mode: get will fail without specifying ignore_nonexistent_bucket: True.
  • udm_user - Manage posix users on a univention corporate server

    • update_password: always will update passwords if they differ. on_create will only set the password for newly created users.
  • virt - Manages virtual machines supported by libvirt

    • autostart: start VM at host startup
  • vmware_guest - Manages virtual machines in vcenter

    • annotation: A note or annotation to include in the VM
    • cluster: The cluster name where the VM will run.
    • customization: Parameters to customize template
    • customvalues: Define a list of customvalues to set on VM.A customvalue object takes 2 fields 'key' and 'value'.
    • guest_id: Set the guest ID (Debian, RHEL, Windows...)This field is required when creating a VMValid values are referenced here: https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html
    • is_template: Flag the instance as a template
    • networks: Network to use should include name or vlan entryAdd an optional ip and netmask for network configurationAdd an optional gateway entry to configure a gatewayAdd an optional mac entry to customize mac addressAdd an optional dns_servers or domain entry per interface (Windows)Add an optional device_type to configure the virtual NIC (pcnet32, vmxnet2, vmxnet3, e1000, e1000e)
    • resource_pool: Affect machine to the given resource poolResource pool should be child of the selected host parent

Database Modules

Files Modules

Monitoring Modules

Net Tools Modules

Network Modules

Notification Modules

  • mail - Send an email
    • secure: If always, the connection will only send email if the connection is Encrypted. If the server doesn't accept the encrypted connection it will fail.If try, the connection will attempt to setup a secure SSL/TLS session, before trying to send.If never, the connection will not attempt to setup a secure SSL/TLS session, before sendingIf starttls, the connection will try to upgrade to a secure SSL/TLS connection, before sending. If it is unable to do so it will fail.
    • timeout: Sets the Timeout in seconds for connection attempts
  • mqtt - Publish a message on an MQTT topic for the IoT
    • ca_certs: The path to the Certificate Authority certificate files that are to be treated as trusted by this client. If this is the only option given then the client will operate in a similar manner to a web browser. That is to say it will require the broker to have a certificate signed by the Certificate Authorities in ca_certs and will communicate using TLS v1, but will not attempt any form of authentication. This provides basic network encryption but may not be sufficient depending on how the broker is configured.
    • certfile: The path pointing to the PEM encoded client certificate. If this is not None it will be used as client information for TLS based authentication. Support for this feature is broker dependent.
    • keyfile: The path pointing to the PEM encoded client private key. If this is not None it will be used as client information for TLS based authentication. Support for this feature is broker dependent.

Packaging Modules

Source Control Modules

System Modules

Utilities Modules

Web Infrastructure Modules

Windows Modules

  • win_copy - Copies files to remote locations on windows hosts.
    • content: When used instead of src, sets the contents of a file directly to the specified value. This is for simple values, for anything complex or with formatting please switch to the template module.
    • force: If set to yes, the remote file will be replaced when content is different than the source.If set to no, the remote file will only be transferred if the destination does not exist.
    • remote_src: If False, it will search for src at originating/master machine, if True it will go to the remote/target machine for the src.
  • win_chocolatey - Installs packages using chocolatey
    • timeout: The time to allow chocolatey to finish before timing out. aliases: execution_timeout
  • win_nssm - NSSM - the Non-Sucking Service Manager
    • app_parameters_free_form: Single string of parameters to be passed to the service.Use either this or app_parameters, not both
  • win_share - Manage Windows shares
    • caching_mode: Set the CachingMode for this share.
  • win_stat - returns information about a Windows file
    • checksum_algorithm: Algorithm to determine checksum of file. Will throw an error if the host is unable to use specified algorithm.
  • win_template - Templates a file out to a remote server.
    • block_end_string: The string marking the end of a block.
    • block_start_string: The string marking the beginning of a block.
    • force: the default is yes, which will replace the remote file when contents are different than the source. If no, the file will only be transferred if the destination does not exist.
    • newline_sequence: Specify the newline sequence to use for templating files.
    • trim_blocks: If this is set to True the first newline after a block is removed (block, not variable tag!).
    • variable_end_string: The string marking the end of a print statement.
    • variable_start_string: The string marking the beginning of a print statement.
  • win_service - Manages Windows services
    • dependencies: A list of service dependencies to set for this particular service.This should be a list of service names and not the display name of the service.This works by dependency_action to either add/remove or set the services in this list.
    • dependency_action: Used in conjunction with dependency to either add the dependencies to the existing service dependencies.Remove the dependencies to the existing dependencies.Set the dependencies to only the values in the list replacing the existing dependencies.
    • description: The description to set for the service.
    • desktop_interact: Whether to allow the service user to interact with the desktop.This should only be set to true when using the LocalSystem username.
    • display_name: The display name to set for the service.
    • force_dependent_services: If True, stopping or restarting a service with dependent services will force the dependent services to stop or restart also.If False, stopping or restarting a service with dependent services may fail.
    • password: The password to set the service to start as.This and the username argument must be supplied together.If specifying LocalSystem, NetworkService or LocalService this field must be an empty string and not null.
    • path: The path to the executable to set for the service.
    • username: The username to set the service to start as.This and the password argument must be supplied together.
  • win_uri - Interacts with webservices.
    • dest: Output the response body to a file.
5
5
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
5
5