ansible - 通过 Ansible 安装 Homebrew 卡住了
问题描述
我正在尝试通过 Ansible 配置 Homebrew,以在 Mac Catalina 来宾中自动运行在 VMware 中的 Mac VM。我已经尝试了一些在线可用的片段,但没有一个有效。
这是最推荐的脚本。我试过成为 & become_user
- name: Install Homebrew
# script: install-homebrew.sh
shell: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
有人建议以异步模式运行它。现在脚本响应速度很快,但由于它需要 sudo 访问权限而抱怨并停止,即使我正在成为的用户已经在 macOS 中担任管理员角色。
- name: Install Homebrew
# script: install-homebrew.sh
shell: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
become_user: seng
become: yes
async: 30
poll: 5
register: out2
我怀疑是 Python 2.7,所以我使用 pyenv 手动实例化了 Python 3.8.5,然后将其用作 python_interpretor,它的行为方式也与 macOS 默认的 python 对应部分相同。
我尝试了单独的 shell 脚本、命令和 shell 方法,但它们都遇到了永远卡住的问题
解决方案
推荐阅读
- angular - 我只想在该 id 有如下值时才显示动态表单?我该如何处理它?
- vba - 刷新后台查询的运行时错误 1004
- string - 颤振 | 如何检查字符串是否不包含子字符串或字符
- unix - 如何从文件中删除与字符串匹配的行
- deep-learning - PermissionError 在加载 pytorch 模型期间
- python - 安装sickits.audiolab 时出错
- python - Pandas to_sql - 传入的表格数据流 (TDS) 远程过程调用 (RPC) 协议流不正确
- javascript - Jquery没有按类获取元素
- javascript - 标签不显示值动态复选框
- python - 如何使用 Kfold 微调 SVM 超参数