Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

301
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda