ansible wget then exec scripts => get_url equivalent

前端 未结 6 932
慢半拍i
慢半拍i 2020-12-09 09:00

I always wonder what is the good way to replace the following shell tasks using the \"ansible way\" (with get_url, etc.):

- name: I         


        
6条回答
  •  渐次进展
    2020-12-09 09:26

    Consider using the get_url or uri module rather than running curl.

    For example:

    - name: Download setup_8.x script
      get_url: url=https://deb.nodesource.com/setup_8.x dest=/opt mode=755
    - name: Setup Node.js
      command: /opt/setup_8.x
    - name: Install Node.js (JavaScript run-time environment)
      apt: name=nodejs state=present
    

提交回复
热议问题