Thanks Michael.  Yeah I didn't mean pip == apt but that the apt module in 
ansible take a file like the pip module does.   

Here is what I ended up with in case anyone else needs to do the same thing.

- name: Ensure all base system packages are installed
  sudo: true
  apt: pkg={{ item }} state=installed
  with_lines: cat ../files/base-packages.txt

On Thursday, July 17, 2014 9:42:29 PM UTC-4, Michael DeHaan wrote:
>
> apt is not pip, but we have some very nice lookup plugins that are useful.
>
> - apt: name={{ item }} state=installed
>   with_pipe: cat /path/to/file.txt
>
> Note that the file.txt is assumed to be on the control machine.
>
> Alternatively, you could register the result of running ls and loop 
> through "result.stdout_lines"
>
>
>
>
>
> On Thu, Jul 17, 2014 at 4:12 PM, Jason Clark <[email protected] 
> <javascript:>> wrote:
>
>> Is there a way to have a file i.e system-requirements.txt with a package 
>> per line and have the apt module install that?  Exactly how pip works...
>>
>>  -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/4cd3ee55-5439-445f-932f-4b6230e04898%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/4cd3ee55-5439-445f-932f-4b6230e04898%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/55d7fe9f-94d1-4f61-aa8c-80c86e8fe511%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to