Closed
Description
SUMMARY
The digital_ocean_droplet module does not appropriately set the state to inactive on initial creation (i.e. if you try to create a droplet that doesn't already exist and set state to inactive, you will actually receive a droplet that is powered on)
ISSUE TYPE
- Bug Report
COMPONENT NAME
digital_ocean_droplet
ANSIBLE VERSION
╰─ ansible --version
ansible 2.9.20
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/tyler/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.9/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.9.4 (default, Apr 6 2021, 00:00:00) [GCC 11.0.1 20210324 (Red Hat 11.0.1-0)]
CONFIGURATION
OS / ENVIRONMENT
NAME=Fedora
VERSION="34 (Workstation Edition)"
ID=fedora
VERSION_ID=34
VERSION_CODENAME=""
PLATFORM_ID="platform:f34"
PRETTY_NAME="Fedora 34 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:34"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/34/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=34
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=34
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation
STEPS TO REPRODUCE
Create a droplet that doesn't exist with an initial state of inactive
and you will receive a droplet that is actually powered on
---
- hosts: localhost
tasks:
- community.digitalocean.digital_ocean_droplet:
state: inactive
name: "my-test-1"
unique_name: true
size: s-1vcpu-1gb
region: nyc1
image: ubuntu-16-04-x64
wait_timeout: 500
register: result
- debug:
msg: "{{ result }}"
EXPECTED RESULTS
I expect to receive a droplet that is powered off.
ACTUAL RESULTS
I receive a droplet that is powered on.