From 86ba4f3e469de56158301ff1b4a68138f09ab1c2 Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Mon, 11 Mar 2019 18:13:52 +0100 Subject: [PATCH] remove some instances of `state: installed` (#53537) This fixes the examples in multiple modules so they use `state: present` instead of `state: installed`. --- docs/docsite/rst/user_guide/playbooks_environment.rst | 10 ++++++++-- lib/ansible/modules/net_tools/nmcli.py | 2 +- lib/ansible/modules/packaging/os/swdepot.py | 2 +- lib/ansible/modules/utilities/logic/async_status.py | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/docsite/rst/user_guide/playbooks_environment.rst b/docs/docsite/rst/user_guide/playbooks_environment.rst index a86a5a1ea29..b07b087a24d 100644 --- a/docs/docsite/rst/user_guide/playbooks_environment.rst +++ b/docs/docsite/rst/user_guide/playbooks_environment.rst @@ -16,7 +16,10 @@ Ansible makes it easy for you to configure the remote execution environment by u tasks: - - apt: name=cobbler state=installed + - name: Install cobbler + package: + name: cobbler + state: present environment: http_proxy: http://proxy.example.com:8080 @@ -32,7 +35,10 @@ The environment can also be stored in a variable, and accessed like so:: tasks: - - apt: name=cobbler state=installed + - name: Install cobbler + package: + name: cobbler + state: present environment: "{{proxy_env}}" You can also use it at a play level:: diff --git a/lib/ansible/modules/net_tools/nmcli.py b/lib/ansible/modules/net_tools/nmcli.py index 35f39ec16eb..5454e08935c 100644 --- a/lib/ansible/modules/net_tools/nmcli.py +++ b/lib/ansible/modules/net_tools/nmcli.py @@ -371,7 +371,7 @@ EXAMPLES = r''' - nm-connection-editor - libsemanage-python - policycoreutils-python - state: installed + state: present ##### Working with all cloud nodes - Teaming - name: Try nmcli add team - conn_name only & ip4 gw4 diff --git a/lib/ansible/modules/packaging/os/swdepot.py b/lib/ansible/modules/packaging/os/swdepot.py index 505a31f25e1..09edc93e855 100644 --- a/lib/ansible/modules/packaging/os/swdepot.py +++ b/lib/ansible/modules/packaging/os/swdepot.py @@ -46,7 +46,7 @@ options: EXAMPLES = ''' - swdepot: name: unzip-6.0 - state: installed + state: present depot: 'repository:/path' - swdepot: diff --git a/lib/ansible/modules/utilities/logic/async_status.py b/lib/ansible/modules/utilities/logic/async_status.py index d2a4064eb29..e2d950865d7 100644 --- a/lib/ansible/modules/utilities/logic/async_status.py +++ b/lib/ansible/modules/utilities/logic/async_status.py @@ -48,7 +48,7 @@ EXAMPLES = r''' - name: Asynchronous yum task yum: name: docker-io - state: installed + state: present async: 1000 poll: 0 register: yum_sleeper