Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am trying to play with Ansible a little bit and I’ve created a test playbook but it is failing for some reason and I can’t figure out why. I’ve tested the connectivity between my control node and the worker node but when I try to run my playbook I get this error:
ERROR! Syntax Error while loading YAML.
mapping values are not allowed in this context
The error appears to have been in '/root/ansible/setup.yaml': line 9, column 12, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Apache started
service:
^ here
I can not see anything wrong with the service part in my playbook. Here’s what I currently have:
---
- hosts: webservers
vars:
my_service: apache2
desired_state: started
tasks:
- name: Apache started
service:
name: "{{ my_service }}"
state: "{{ desired_state }}"
Has anyone seen this error before?
jeffs
0621335d663b4b699a60eb27e28153
accesstrax
Dwight Trumbower
admin
yimprogramming
samunyi90
1d6ce141ab5444dfb1ea2dd29cf4b1
Matt Fricker
joel9b158e40551b15093f213f
EmilJacobs