Convert role tasks to YAML format

This commit is contained in:
Maciej Delmanowski 2015-03-27 10:50:21 +01:00
parent 1c988bd2ac
commit 79baaa609b
2 changed files with 15 additions and 8 deletions

View File

@ -1,6 +1,7 @@
---
- name: Restart isc-dhcp-server
service: name=isc-dhcp-server state=restarted
service:
name: 'isc-dhcp-server'
state: 'restarted'

View File

@ -1,13 +1,19 @@
---
- name: Install DHCP server packages
apt: pkg={{ item }} state=latest install_recommends=no
- name: Install DHCP packages
apt:
name: '{{ item }}'
state: 'present'
install_recommends: False
with_items: [ 'isc-dhcp-server' ]
- name: Configure DHCP server
template: src={{ item }}.j2 dest=/{{ item }} owner=root group=root mode=0644
template:
src: '{{ item }}.j2'
dest: '/{{ item }}'
owner: 'root'
group: 'root'
mode: '0644'
with_items: [ 'etc/default/isc-dhcp-server', 'etc/dhcp/dhcpd.conf' ]
notify: Restart isc-dhcp-server
notify: [ 'Restart isc-dhcp-server' ]