You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let the sensitive parts of credentials to be defined externally as variables (#121)
* let the sensitive parts of credentials to be defined externally as variables
* change from the command line to an example playbook
* add changelog fragments
* get rid off the command line
Copy file name to clipboardExpand all lines: roles/filetree_create/README.md
+91Lines changed: 91 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ The following variables are required for that role to work properly:
25
25
|`output_path`|`/tmp/filetree_output`| yes | str | The path to the output directory where all the generated `yaml` files with the corresponding Objects as code will be written to. |
26
26
|`input_tag`|`['all']`| no | List of Strings | The tags which are applied to the 'sub-roles'. If 'all' is in the list (the default value) then all roles will be called. Valid tags can be found under `vars/valid_tags`|
27
27
|`flatten_output`| N/A | no | bool | Whether to flatten the output in single files per each object type instead of the normal exportation structure |
28
+
|`secrets_as_variables`| N/A | no | bool | Whether to export the secrets as variables that can be populated from existing variables/files. An example: `vaulted_eda_credentials_my_eda_credential_password`, that follows the syntax: `<secrets_as_variables_prefix>_<object_type>_<object_name>_<field_name>`|
29
+
|`secrets_as_variables_prefix`| vaulted | no | str | The prefix to use for the variables defined by `secrets_as_variables` feature. |
28
30
|`show_encrypted`| N/A | no | bool | Whether to remove the string '\$encrypted\$' in credentials output (not the actual credential value) |
29
31
|`omit_id`| N/A | no | bool | Whether to create output files without objects id.|
30
32
|`organization`| N/A | no | str | Default organization for all objects that have not been set in the source controller.|
@@ -247,6 +249,95 @@ This example will export all object but some with modifications:
247
249
...
248
250
```
249
251
252
+
## Usage example for the `secrets_as_variables` feature
253
+
254
+
To let the credentials and the users to be exported and imported 'as is', without any modification, the sensitive data (that can't be exported through the API) can be abstracted to extra vars (or variable's file) and vaulted. Those variables can be referenced at the original objects' code, so they can be imported without any manual modification. To clarify the described scenario, the following output shows the exported object for a gateway user, using the `secrets_as_variable` feature:
0 commit comments