加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

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

发布时间:2020-12-15 19:00:05 所属栏目:安全 来源:网络整理
导读:我总是想知道使用“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
我总是想知道使用“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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读