parent
ec50e1191f
commit
d70b4f6665
1 changed files with 16 additions and 16 deletions
|
@ -13,22 +13,22 @@ Blocks allow for logical grouping of tasks and in play error handling. Most of w
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install, configure, and start Apache
|
- name: Install, configure, and start Apache
|
||||||
block:
|
block:
|
||||||
- name: install httpd and memcached
|
- name: install httpd and memcached
|
||||||
yum:
|
yum:
|
||||||
name: "{{ item }}"
|
name:
|
||||||
state: present
|
- httpd
|
||||||
loop:
|
- memcached
|
||||||
- httpd
|
state: present
|
||||||
- memcached
|
|
||||||
- name: apply the foo config template
|
- name: apply the foo config template
|
||||||
template:
|
template:
|
||||||
src: templates/src.j2
|
src: templates/src.j2
|
||||||
dest: /etc/foo.conf
|
dest: /etc/foo.conf
|
||||||
- name: start service bar and enable it
|
- name: start service bar and enable it
|
||||||
service:
|
service:
|
||||||
name: bar
|
name: bar
|
||||||
state: started
|
state: started
|
||||||
enabled: True
|
enabled: True
|
||||||
when: ansible_facts['distribution'] == 'CentOS'
|
when: ansible_facts['distribution'] == 'CentOS'
|
||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
|
|
Loading…
Reference in a new issue