I need set the environment variable to build some app at startup, i use vars
in the playbook file:
---
- hosts: all
sudo: yes
vars:
build_env:
VAR1: value1
VAR2: value2
VAR3: value3
And set with environment
into task to build app
- name: Build app
environment: "{{build_env}}"
command: "{{ item }} chdir={{app1}}"
with_items:
- npm install
- bower
- gulp
Also i need add the same variables to /etc/environment
but i would not replicate the variables in another task, any idea?