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?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/7759d2ea-f84c-403e-852e-6c25db203ff5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.