Skip to content

Help understanding !If (include file only if var is set) #76

Description

@mrambossek

hi - struggling again, asking for help :)

  systemd:
    units: !Concat
      - !Include units/ALL.yaml
      - !Include units/docker_compose.yaml
      - !Include units/mount_docker.yaml
      - !Include units/mount_data.yaml
      - !If
        test: !Op [!Void, ne, !Var etcd_token]
        then: !Include units/etcd.yaml

i want to check if one of the "parent" files set the variable etcd_token - and if so, include the file.. is this doable?
TIA!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions