Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

298
Views
Ansible - using npm with a proxy

I have this Ansible code:

- name: Installing project files
  shell: |
    cd /opt/ewd-server
    npm install
  become_user: prod-{{SITE}}

Every time I run the code and it reaches that part it keeps saying that the server doesn't have the proxy up. Even thought I executed 2 commands before that:

npm config set https-proxy
npm config set proxy

The values are actually the companies IP's, but redacted for obvious reasons.

The code keeps running until it reaches the 'npm install' task, stays for about half an hour, then Ansible gives the error 'ENOENT'.

NOTE: when I run the npm install command in the server without Ansible it works.

If anyone knows any replacement for npm that works with Ansible, or a solution for this issue please help.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Try configuring the environment variables 'http_proxy' and 'https_proxy':

 - name: Installing project files, using a specific proxy
     shell: |
              cd /opt/ewd-server
              npm install
     become_user: prod-{{SITE}}
     environment:
       http_proxy: http://proxy.adres
       https_proxy: http://proxy.adres

Of course, edit the proxy values.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!