community.general/lib/ansible
Rémi REY 0461620b2d Terraform: add workspace support for switching and removing workspaces (#43489)
From terraform documentation:
```
The persistent data stored in the backend belongs to a workspace. Initially the backend has only one workspace, called "default", and thus there is only one Terraform state associated with that configuration.

Certain backends support multiple named workspaces, allowing multiple states to be associated with a single configuration. The configuration still has only one backend, but multiple distinct instances of that configuration to be deployed without configuring a new backend or changing authentication credentials.
```

This patch introduces the `workspace` parameter in the terraform module. The module will select
the workspace is it does not exists, or simply select it if it exists.

Fixes #43134

Add 'purge_workspace' parameter and handle the workspace context

The `purge_workspace` parameter allows to remove a workspace when asking for state = absent.
It allows to leave a clean state file without empty workspaces if the parameter is true.

Also adding the support of a workspace context that allows to restore the workspace
when that was active when the module started.
2018-08-02 09:37:26 -04:00
..
cli Fix config manager to show errors 2018-08-01 19:42:35 -07:00
compat Surround top-level function and class definitions with two blank lines. 2018-07-31 12:06:56 -07:00
config Fix config manager to show errors 2018-08-01 19:42:35 -07:00
errors give hint to users when a file is not found 2018-04-10 17:19:03 -04:00
executor remove deprecated 2018-08-01 15:17:28 -04:00
galaxy Fix invalid Dockerfile created by "galaxy init --type apb" (#42017) 2018-07-17 08:11:42 +05:30
inventory Error on empty group/host name (#42584) 2018-07-12 09:59:00 -04:00
module_utils cliconf refactor eos, nxos fix (#43596) 2018-08-02 16:34:48 +05:30
modules Terraform: add workspace support for switching and removing workspaces (#43489) 2018-08-02 09:37:26 -04:00
parsing Surround top-level function and class definitions with two blank lines. 2018-07-31 12:06:56 -07:00
playbook Fix referenced before assignment in role requirements 2018-08-01 16:48:49 -04:00
plugins cliconf refactor eos, nxos fix (#43596) 2018-08-02 16:34:48 +05:30
template Add specific exceptions to except 2018-08-01 16:42:05 -04:00
utils Normalize config from environment as text strings 2018-08-01 19:42:35 -07:00
vars Only cache task.loop when delegated_host was templated. Fixes #43016 #43449 (#43451) 2018-07-31 15:58:53 -05:00
__init__.py
constants.py Fix fact cleaning (#42595) 2018-07-12 16:12:42 -04:00
release.py update 2.7 codename 2018-05-31 15:46:07 -07:00