Reputation: 1
- hosts: local_host
remote_user: ansible
become: yes
become_method: sudo
connection: ssh
gather_fact: yes
tasks:
name: installing MariaDB
yum:
name: mariadb-server
state: latest
notify: startservice
handlers:
name: startservice
service:
name: mariadb
state: restarted
Upvotes: 0
Views: 56
Reputation: 39688
The error is in the first two lines:
- hosts: local_host
remote_user: ansible
host
cannot have both a scalar value (local_host
) and a mapping value (starting at remote_user:
). Chances are that you want remote_user
to be on the level of hosts
, making it a sibling key:
- host: local_host
remote_user: ansible
# and so on
Upvotes: 1