Ansible - ERROR! the field 'hosts' is required but was not set -


i've error when launch playbook don't found why....

error! field 'hosts' required not set

there main.yml :

--- - hosts: hosts - vars:    - elasticsearch_java_home: /usr/lib/jmv/jre-1.7.0   - elasticsearch_http_port: 8443  - tasks:    - include: tasks/main.yml  - handlers:   - include: handlers/main.yml 

and /etc/ansible/hosts :

[hosts] 10.23.108.182 10.23.108.183 10.23.108.184 10.23.108.185 

when test ping, :

[root@poste08-08-00 elasticsearch]# ansible hosts -m ping 10.23.108.183 | success => {     "changed": false,      "ping": "pong" } 10.23.108.182 | success => {     "changed": false,      "ping": "pong" } 10.23.108.185 | success => {     "changed": false,      "ping": "pong" } 10.23.108.184 | success => {     "changed": false,      "ping": "pong" } 

please, me :) regards,

you have syntax error in playbook.

--- - hosts: webservers   vars:     http_port: 80     max_clients: 200 

see: https://docs.ansible.com/ansible/playbooks_intro.html


Comments

Popular posts from this blog

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -