Mac - Ansible配置本地环境

由于更换机器,许多工具和环境需要重新配置,一项项的安装设置也是挺麻烦的,因此,用ansbile实现了本地的部署

本地环境

~ $ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.3
BuildVersion:	18D109

手顺

Homebrew安装

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
~ $ brew -v
Homebrew 2.0.6
Homebrew/homebrew-core (git revision 71a4; last commit 2019-04-01)

Ansible安装

$ brew install ansible
~ $ ansible --version
ansible 2.7.9
  config file = None
  configured module search path = ['/Users/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/2.7.9/libexec/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)]

Playbook做成

Ansible有推荐的文件结构
目前在进行中,后续补充完成gitHub

你可能感兴趣的:(Mac - Ansible配置本地环境)