diff options
-rw-r--r-- | docs/docsite/rst/dev_guide/testing_units.rst | 6 | ||||
-rw-r--r-- | docs/docsite/rst/user_guide/playbooks_conditionals.rst | 2 | ||||
-rw-r--r-- | lib/ansible/modules/cloud/amazon/ec2.py | 3 | ||||
-rw-r--r-- | lib/ansible/modules/cloud/amazon/ec2_launch_template.py | 23 | ||||
-rw-r--r-- | lib/ansible/modules/cloud/amazon/execute_lambda.py | 8 | ||||
-rw-r--r-- | lib/ansible/modules/cloud/azure/azure_rm_manageddisk.py | 2 | ||||
-rw-r--r-- | lib/ansible/modules/files/stat.py | 2 | ||||
-rw-r--r-- | lib/ansible/modules/network/aruba/aruba_config.py | 2 | ||||
-rw-r--r-- | lib/ansible/modules/windows/win_disk_facts.py | 2 |
9 files changed, 32 insertions, 18 deletions
diff --git a/docs/docsite/rst/dev_guide/testing_units.rst b/docs/docsite/rst/dev_guide/testing_units.rst index ab76085239..be243b7598 100644 --- a/docs/docsite/rst/dev_guide/testing_units.rst +++ b/docs/docsite/rst/dev_guide/testing_units.rst @@ -76,10 +76,10 @@ install all the required dependencies needed for unit tests. For example: When using ``ansible-test`` with ``--tox`` requires tox >= 2.5.0 -The full list of requirements can be found at `test/runner/requirements -<https://github.com/ansible/ansible/tree/devel/test/runner/requirements>`_. Requirements +The full list of requirements can be found at `test/lib/ansible_test/_data/requirements +<https://github.com/ansible/ansible/tree/devel/test/lib/ansible_test/_data/requirements>`_. Requirements files are named after their respective commands. See also the `constraints -<https://github.com/ansible/ansible/blob/devel/test/runner/requirements/constraints.txt>`_ +<https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/_data/requirements/constraints.txt>`_ applicable to all commands. diff --git a/docs/docsite/rst/user_guide/playbooks_conditionals.rst b/docs/docsite/rst/user_guide/playbooks_conditionals.rst index fad0834ffe..d07d942de4 100644 --- a/docs/docsite/rst/user_guide/playbooks_conditionals.rst +++ b/docs/docsite/rst/user_guide/playbooks_conditionals.rst @@ -352,6 +352,7 @@ Possible values (sample, not complete list):: Archlinux ClearLinux Coreos + CentOS Debian Fedora Gentoo @@ -363,6 +364,7 @@ Possible values (sample, not complete list):: Slackware SMGL SUSE + Ubuntu VMwareESX .. See `OSDIST_LIST` diff --git a/lib/ansible/modules/cloud/amazon/ec2.py b/lib/ansible/modules/cloud/amazon/ec2.py index a1da2795a5..f17e825ecf 100644 --- a/lib/ansible/modules/cloud/amazon/ec2.py +++ b/lib/ansible/modules/cloud/amazon/ec2.py @@ -118,7 +118,7 @@ options: spot_wait_timeout: version_added: "1.5" description: - - How long to wait for the spot instance request to be fulfilled. + - How long to wait for the spot instance request to be fulfilled. Affects 'Request valid until' for setting spot request lifespan. default: 600 type: int count: @@ -370,6 +370,7 @@ EXAMPLES = ''' vpc_subnet_id: subnet-29e63245 assign_public_ip: yes spot_launch_group: report_generators + instance_initiated_shutdown_behavior: terminate # Examples using pre-existing network interfaces - ec2: diff --git a/lib/ansible/modules/cloud/amazon/ec2_launch_template.py b/lib/ansible/modules/cloud/amazon/ec2_launch_template.py index 85a269e535..13567f2880 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_launch_template.py +++ b/lib/ansible/modules/cloud/amazon/ec2_launch_template.py @@ -286,24 +286,29 @@ options: ''' EXAMPLES = ''' -- name: Make instance with an instance_role +- name: Create an ec2 launch template ec2_launch_template: - name: "test-with-instance-role" - image_id: "ami-foobarbaz" + name: "my_template" + image_id: "ami-04b762b4289fba92b" key_name: my_ssh_key instance_type: t2.micro iam_instance_profile: myTestProfile disable_api_termination: true -- name: Make one with a different instance type, but leave the older version as default +- name: > + Create a new version of an existing ec2 launch template with a different instance type, + while leaving an older version as the default version ec2_launch_template: - name: "test-with-instance-role" - image_id: "ami-foobarbaz" + name: "my_template" default_version: 1 - key_name: my_ssh_key instance_type: c5.4xlarge - iam_instance_profile: myTestProfile - disable_api_termination: true + +- name: Delete an ec2 launch template + ec2_launch_template: + name: "my_template" + state: absent + +# This module does not yet allow deletion of specific versions of launch templates ''' RETURN = ''' diff --git a/lib/ansible/modules/cloud/amazon/execute_lambda.py b/lib/ansible/modules/cloud/amazon/execute_lambda.py index ebe5bf6927..3d88c48087 100644 --- a/lib/ansible/modules/cloud/amazon/execute_lambda.py +++ b/lib/ansible/modules/cloud/amazon/execute_lambda.py @@ -106,7 +106,13 @@ EXAMPLES = ''' wait: true tail_log: true register: response - # the response will have a `logs` key that will contain a log (up to 4KB) of the function execution in Lambda. + # the response will have a `logs` key that will contain a log (up to 4KB) of the function execution in Lambda + +# Pass the Lambda event payload as a json file. +- execute_lambda: + name: test-function + payload: "{{ lookup('file','lambda_event.json') }}" + register: response - execute_lambda: name: test-function diff --git a/lib/ansible/modules/cloud/azure/azure_rm_manageddisk.py b/lib/ansible/modules/cloud/azure/azure_rm_manageddisk.py index e630f1bcdd..5ea2240d2f 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_manageddisk.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_manageddisk.py @@ -158,7 +158,7 @@ EXAMPLES = ''' disk_size_gb: 4 - name: Delete managed disk - azure_rm_manage_disk: + azure_rm_manageddisk: name: mymanageddisk location: eastus resource_group: myResourceGroup diff --git a/lib/ansible/modules/files/stat.py b/lib/ansible/modules/files/stat.py index 14ff90cb90..b05d701237 100644 --- a/lib/ansible/modules/files/stat.py +++ b/lib/ansible/modules/files/stat.py @@ -342,7 +342,7 @@ stat: sample: False version_added: 2.2 executable: - description: Tells you if the invoking user has the execute the path + description: Tells you if the invoking user has execute permission on the path returned: success, path exists and user can execute the path type: bool sample: False diff --git a/lib/ansible/modules/network/aruba/aruba_config.py b/lib/ansible/modules/network/aruba/aruba_config.py index fa5a28eb3c..2123dfbe84 100644 --- a/lib/ansible/modules/network/aruba/aruba_config.py +++ b/lib/ansible/modules/network/aruba/aruba_config.py @@ -184,7 +184,7 @@ EXAMPLES = """ - name: diff the running-config against a provided config aruba_config: diff_against: intended - intended: "{{ lookup('file', 'master.cfg') }}" + intended_config: "{{ lookup('file', 'master.cfg') }}" - name: configure interface settings aruba_config: diff --git a/lib/ansible/modules/windows/win_disk_facts.py b/lib/ansible/modules/windows/win_disk_facts.py index 2a9f293545..a9a77a29c5 100644 --- a/lib/ansible/modules/windows/win_disk_facts.py +++ b/lib/ansible/modules/windows/win_disk_facts.py @@ -50,7 +50,7 @@ EXAMPLES = r''' - name: Output second disk serial number debug: - var: ansible_facts.disks[0].serial_number + var: ansible_facts.disks[1].serial_number ''' RETURN = r''' |