bash – ansible wget然后exec scripts => get_url等价

前端之家收集整理的这篇文章主要介绍了bash – ansible wget然后exec scripts => get_url等价前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我总是想知道使用“ansible方式”(使用get_url等)替换以下shell任务的好方法是什么:
- name: Install oh-my-zsh
  shell: wget -qO - https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | bash -

要么

- name: Install nodesource repo
  shell: curl -sL https://deb.nodesource.com/setup_5.x | bash -
这对我有用:
- name: Download zsh installer
    get_url: url=https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh dest=/tmp/zsh-installer.sh

  - name: Execute the zsh-installer.sh
    shell: /tmp/zsh-installer.sh

  - name: Remove the zsh-installer.sh
    file: path=/tmp/zsh-installer.sh state=absent

猜你在找的Bash相关文章