launchdarkly_feature_flag_environment – Create Environment specific flag targeting

New in version 0.1.0.

Synopsis

  • Manage LaunchDarkly manage feature flags and account settings.

Parameters

Parameter Choices/Defaults Comments
api_key
string / required
LaunchDarkly API Key. May be set as LAUNCHDARKLY_ACCESS_TOKEN environment variable.
environment_key
string / required
A unique key that will be used to reference the environment.
fallthrough
-
Nested dictionary describing the default variation to serve if no prerequisites,
targets or rules apply.
off_variation
integer
Variation served if flag targeting is turned off.
project_key
-
Default:
"default"
Project key will group flags together
rules
list
Target users based on user attributes
state
string
    Choices:
  • absent
  • enabled
  • disabled
  • present ←
Indicate desired state of the resource
targets
list
Assign users to a specific variation

Examples

---
# Create a new flag
- launchdarkly_feature_flag_environment:
    state: present
    flag_key: example_flag
    environment_key: default
    off_variation: 1
    targets:
        - variation: 1
          values:
            - test@example.com
            - test2@example.com
    comment: Updating default env values

- launchdarkly_feature_flag_environment:
    state: enabled
    flag_key: example_2
    environment_key: env_2
    fallthrough:
      variation: 1
    rules:
    - variation: 1
        clauses:
        - attribute: test-attribute
            op: contains
            values:
            - 2
            - 3
            negate: true
    prerequisites:
      - variation: 0
        key: example_flag

Return Values

Common return values are documented here, the following are the fields unique to this :

Key Returned Description
feature_flag_environment
dictionary
on success
Dictionary containing a Feature Flag Config



Status

  • This is not guaranteed to have a backwards compatible interface. [preview]

  • This is maintained by the Ansible Community. [community]

Hint

If you notice any issues in this documentation, you can edit this document to improve it.

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.