# Ensure environment: is preserved during call.

- name: integration/playbook_semantics/environment.yml
  hosts: test-targets
  tasks:
    - name: Echo $SOME_ENV
      shell: echo $SOME_ENV
      environment:
        SOME_ENV: 123
      register: result

    - assert:
        that: "result.stdout == '123'"
        fail_msg: |
          result={{ result }}
  tags:
    - environment
