Use integer comparision when dealing with "ansible_distribution_major_version"
[AnsibleRoles.git] / roles / nfs-client / tasks / main.yml
1 ---
2 # nfs-client tasks
3
4 - name: /etc/idmapd.conf file
5   tags:
6     - nfs
7   template: >
8     dest=/etc/idmapd.conf
9     group=root
10     mode=0644
11     owner=root
12     src=idmapd.conf.j2
13   notify:
14     - restart "nfs-common"
15
16 - name: install "nfs-common"
17   tags:
18     - nfs
19     - packages
20   apt: >
21     name=nfs-common
22     state=present
23
24 - name: ensure service "nfs-common" is enabled and started
25   tags:
26     - nfs
27     - services
28   service: >
29     enabled=yes
30     name=nfs-common
31     state=started
32   when: "ansible_distribution_major_version|int < 8"