install Ansible on Mac 2.5.0

Hello guys,

I need you help, I try the install Ansible on my Mac, but not is possible, I have this is error:

Please, Can someone tell me, how can I install Ansible correctly on my MAC?

macOS Hig Sierra version 10.13.4,

thanks

[DEPRECATION WARNING]: ANSIBLE_HOSTS option, The variable is misleading as it can be a list of hosts and/or paths to inventory sources , use ANSIBLE_INVENTORY instead.

This feature will be removed in version 2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

[WARNING]: * Failed to parse /etc/ansible/hosts with yaml plugin: YAML inventory has invalid structure, it should be a dictionary, got: <class

‘ansible.parsing.yaml.objects.AnsibleSequence’>

[WARNING]: * Failed to parse /etc/ansible/hosts with ini plugin: need more than 2 values to unpack

[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source

[WARNING]: No inventory was parsed, only implicit localhost is available

[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match ‘all’

[WARNING]: Could not match supplied host pattern, ignoring: server1

Hi,

You have Ansible installed properly I believe. Your issue is caused by having group name with spaces in the inventory. See This.

Hi,

As Biswadip said, your Ansible installation is ok, and the problem is your inventory file having wrong syntax. Also note that you are using variable names maked as obsolete about 2 years ago. I suggest you to follow the official documentation, where you have a quickstart video and a getting started guide, as them have useful information as for example inventory syntax or updated variable names.

Regards,

Oscar