What is the proper way to execute a requirements.txt file in a chef cookbook recipe to install python modules?
question created at Sat, Jun 1, 2019 12:00 AM
I am trying to learn chef and very new at it.
I have a requirements.txt file which I'm trying to execute through a chef recipe to install some Python modules. I have tried different variations of the code, however I feel like I'm missing something. I have tried writing the following code in the chef recipe:
template '/etc' do
execute 'requirements.txt' do
command 'pip install -r requirements.txt'
I was expecting that the requirements file will be called when I run vagrant up and the modules/dependencies of the app will be installed. However, I get this error:
Error executing action run on resource 'execute[requirements.txt]'