diff options
author | Alicia Cozine <879121+acozine@users.noreply.github.com> | 2019-10-16 10:24:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-16 10:24:38 -0500 |
commit | db2e1d92274a1a29fc9c1b869c7f00835a44a8c7 (patch) | |
tree | 579791879f87ae03ec7a9ea79efe1531fa737bea | |
parent | bbc7c2d2ea5824760fdd597eab6a28821233806a (diff) | |
download | ansible-db2e1d92274a1a29fc9c1b869c7f00835a44a8c7.tar.gz |
Backport/2.9/docs (#63521)
* Update stat.py (#63289)
Reword awkward documentation language.
(cherry picked from commit b46299ff86f273c729d0817db90cb52fda04e2d3)
* Update win_disk_facts.py example (#63266)
Fix incorrect index for second disk (should be `disks[1]` not `disks[0]`)
(cherry picked from commit ce1c8c24f7aa85e90cc2ac5ffa1c3381e16c0c1e)
* Fix broken link (#63185)
(cherry picked from commit 021d095625304a44911da55046f0648aa1db49ee)
* Typo on line 161 (#63133)
fix module name for azure_rm_manageddisk in one example
(cherry picked from commit 81a614684ae0434e4ce7336447c41d9b8ffce41d)
* docs: add Centos and Ubuntu to examples for playbook conditionals (#63085)
Co-Authored-By: Sandra McCann <samccann@redhat.com>
(cherry picked from commit 19587b35da4eb16e25d3b9d333401592575ce764)
* Spot instance code error (#63246)
Adds 'instance_initiated_shutdown_behavior: terminate' to spot instance example for greater efficiency.
(cherry picked from commit 5ed163ce3f0814985add5352209ef5621482e428)
* Pass a JSON file to the Lambda's payload (#63261)
* Add an example of passing a JSON file to the Lambda's payload
Events passed to Lambda are commonly in JSON format, the change provides an example of using JSON file as an alternative to the inline YAML payload in the other examples.
(cherry picked from commit 1d5206f53e7cb5f12cb57d1fc5fe98ac4cdf6198)
* Update ec2.py (#63260)
Change the explanation of spot_wait_timeout
(cherry picked from commit 719170e5c1361532bd65f5d9817055c2822e54cc)
* fix aruba_config examples (#63136)
(cherry picked from commit 6ff5968781c77469472be4719036efbe9f6a66f0)
* [ec2_launch_template] Update examples (#63152)
- Update tasks names for existing examples
- Add a new example showing how to delete a launch template
(cherry picked from commit 32980f214a4df97aee871ffd86168bb1cff804a8)
-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''' |