First start ansible on macos

I installed the ansible via pip install, and there are several issues here:

where is the config

Here you should create a file ~/.ansible.cfg

inventory =~/.ansible/hosts

Make a dir to store logs: mkdir ~/.ansible/log/

Need servers to run a test command

  1. I create a virtual server with VirtualBox and linux image with archlinux-2019.07.01-x86_64.iso
  2. Set the network to Bridged Adapter, which using the WiFi-AirPort in the Name selection.
  3. Then clone the server as a second server.
  4. Start the network service, and check the ip address. and
  5. Change the root password with passwd
  6. Now on the MacOS, exec ssh-keygen -t rsa to generate a new ssh identity
  7. Exec ssh-copy-id root@ store the server's password locally.
  8. vi ~/.ansible/hosts and put the content here.

Let's run

ansible -m ping all, ignore the WARNING :)Screen Shot 2019-07-10 at 20.50.56.png