- name: build sources
command: chdir=/var/tmp/{{ item }} sudo .configure --prefix=/usr
command: chdir=/var/tmp/{{ item }} sudo make
command: chdir=/var/tmp/{{ item }} sudo make install
with_items:
- pkg1
- pkg2
- pkg3
- name: build ffmpeg
command: chdir=/var/tmp/ffmpeg-0.11 {{ item }}
with_items:
- sudo ./configure --enable-libmp3lame
- sudo make
- sudo make install PATH=$PATH:/usr/local/bin
If you need env variables set for a specific step, you can add them on the
command line as I've done with the PATH above. The PATH is changed only for
the 'sudo' (e.g. root) environment.
J
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAK5eLPQys9a3tuPNfDOuEnwSTkmEEJKuWYOMJ5vbUsUwUGShVg%40mail.gmail.com.