playbooks_intro.rst: remove duplicite playbook (#38521)

This commit is contained in:
Martin Krizek 2018-04-11 20:45:59 +02:00 committed by GitHub
parent 19a5f96a1a
commit f1e41cbb36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,39 +54,6 @@ can run different plays at different times.
For starters, here's a playbook that contains just one play::
---
- hosts: webservers
vars:
http_port: 80
max_clients: 200
remote_user: root
tasks:
- name: ensure apache is at the latest version
yum:
name: httpd
state: latest
- name: write the apache config file
template:
src: /srv/httpd.j2
dest: /etc/httpd.conf
notify:
- restart apache
- name: ensure apache is running (and enable it at boot)
service:
name: httpd
state: started
enabled: yes
handlers:
- name: restart apache
service:
name: httpd
state: restarted
When working with tasks that have really long parameters or modules that take
many parameters, you can break tasks items over multiple lines to improve the
structure. Below is another version of the above example but using
YAML dictionaries to supply the modules with their ``key=value`` arguments.::
---
- hosts: webservers
vars: