8月 102018
安装
MacBookAir:~ harveymei$ brew install ansible ==> Installing dependencies for ansible: libyaml, openssl, gdbm, readline, sqlite, python@2 ==> Installing ansible dependency: libyaml ==> Downloading https://homebrew.bintray.com/bottles/libyaml-0.2.1.high_sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring libyaml-0.2.1.high_sierra.bottle.tar.gz ? /usr/local/Cellar/libyaml/0.2.1: 9 files, 298.9KB ==> Installing ansible dependency: openssl ==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2o_2.high_sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring openssl-1.0.2o_2.high_sierra.bottle.tar.gz ==> Caveats A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added ina the System keychain), place .pem files in /usr/local/etc/openssl/certs and run /usr/local/opt/openssl/bin/c_rehash This formula is keg-only, which means it was not symlinked into /usr/local, because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries. If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/openssl/lib CPPFLAGS: -I/usr/local/opt/openssl/include ==> Summary ? /usr/local/Cellar/openssl/1.0.2o_2: 1,792 files, 12.3MB ==> Installing ansible dependency: gdbm ==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.17.high_sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring gdbm-1.17.high_sierra.bottle.tar.gz ? /usr/local/Cellar/gdbm/1.17: 20 files, 581.4KB ==> Installing ansible dependency: readline ==> Downloading https://homebrew.bintray.com/bottles/readline-7.0.5.high_sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring readline-7.0.5.high_sierra.bottle.tar.gz ==> Caveats This formula is keg-only, which means it was not symlinked into /usr/local, because macOS provides the BSD libedit library, which shadows libreadline. In order to prevent conflicts when programs look for libreadline we are defaulting this GNU Readline installation to keg-only. For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/readline/lib CPPFLAGS: -I/usr/local/opt/readline/include ==> Summary ? /usr/local/Cellar/readline/7.0.5: 46 files, 1.5MB ==> Installing ansible dependency: sqlite ==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.24.0.high_sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring sqlite-3.24.0.high_sierra.bottle.tar.gz ==> Caveats This formula is keg-only, which means it was not symlinked into /usr/local, because macOS provides an older sqlite3. If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/sqlite/lib CPPFLAGS: -I/usr/local/opt/sqlite/include ==> Summary ? /usr/local/Cellar/sqlite/3.24.0: 11 files, 3.5MB ==> Installing ansible dependency: python@2 ==> Downloading https://homebrew.bintray.com/bottles/python@2-2.7.15_1.high_sierra.bottle.1.tar.gz ######################################################################## 100.0% ==> Pouring python@2-2.7.15_1.high_sierra.bottle.1.tar.gz ==> /usr/local/Cellar/python@2/2.7.15_1/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-externally-managed --record=installed.txt --install-scripts=/usr/local/Cellar/python ==> /usr/local/Cellar/python@2/2.7.15_1/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-externally-managed --record=installed.txt --install-scripts=/usr/local/Cellar/python ==> /usr/local/Cellar/python@2/2.7.15_1/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-externally-managed --record=installed.txt --install-scripts=/usr/local/Cellar/python ==> Caveats Pip and setuptools have been installed. To update them pip install --upgrade pip setuptools You can install Python packages with pip install <package> They will install into the site-package directory /usr/local/lib/python2.7/site-packages See: https://docs.brew.sh/Homebrew-and-Python ==> Summary ? /usr/local/Cellar/python@2/2.7.15_1: 4,672 files, 82.6MB ==> Installing ansible ==> Downloading https://homebrew.bintray.com/bottles/ansible-2.6.2.high_sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring ansible-2.6.2.high_sierra.bottle.tar.gz ? /usr/local/Cellar/ansible/2.6.2: 12,187 files, 153.4MB ==> Caveats ==> openssl A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in /usr/local/etc/openssl/certs and run /usr/local/opt/openssl/bin/c_rehash This formula is keg-only, which means it was not symlinked into /usr/local, because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries. If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/openssl/lib CPPFLAGS: -I/usr/local/opt/openssl/include ==> readline This formula is keg-only, which means it was not symlinked into /usr/local, because macOS provides the BSD libedit library, which shadows libreadline. In order to prevent conflicts when programs look for libreadline we are defaulting this GNU Readline installation to keg-only. For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/readline/lib CPPFLAGS: -I/usr/local/opt/readline/include ==> sqlite This formula is keg-only, which means it was not symlinked into /usr/local, because macOS provides an older sqlite3. If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/sqlite/lib CPPFLAGS: -I/usr/local/opt/sqlite/include ==> python@2 Pip and setuptools have been installed. To update them pip install --upgrade pip setuptools You can install Python packages with pip install <package> They will install into the site-package directory /usr/local/lib/python2.7/site-packages See: https://docs.brew.sh/Homebrew-and-Python MacBookAir:~ harveymei$
配置
手动建立目录/etc/ansible/ 手动建立主机配置文件/etc/ansible/hosts 密钥保存路径:/用户/harveymei/.ssh/