[Python] Ansible Playbook to install nginx server

Discussão em 'Python' iniciado por Stack, Novembro 30, 2024.

  1. Stack

    Stack Membro Participativo

    I want to install nginx in ubuntu machine and start the service using Ansible playbook,

    I am getting this error while running playbook "(): mapping values are not allowed in this context at line 7 column 10"

    Here is the code I tried:

    ---
    -
    hosts: all
    tasks:
    - name: ensure nginx is at the latest version
    apt: name=nginx state=latest
    - name: "start nginx"
    service:
    name: nginx
    state: started

    Continue reading...

Compartilhe esta Página