D
D
DevLearn2020-05-11 20:21:39
Ansible
DevLearn, 2020-05-11 20:21:39

Syntax error in Ansible Playbook. What's wrong?

Good evening. Continuing to pick Ansible. I'm trying to write a simple playbook that just pings my servers. But it doesn't start.

5eb9895f7d33f843375410.png

And this code throws an error.

5eb9899277115257397418.png

What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mihasyo, 2020-05-11
@mihasyo

become: yes
You are missing a space before yes

S
Sanes, 2020-05-11
@Sanes

Most likely due to indentation.

---
- hosts: localhost
  connection: local
  gather_facts: yes
  vars_files: 
   - 'vars/main.yml' 

  tasks: 

    - name: set timezone to UTC
      timezone:
        name: UTC

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question