Browse Source

fixes

master
parent
commit
c216bc7b60
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      tasks/main.yml

+ 6
- 5
tasks/main.yml View File

@@ -1,19 +1,20 @@
--- ---


- name: format - name: format
command: mkswap -U {{ item.uuid }} {{ item.device }}
command: mkswap {% if item.uuid is defined %}-U {{ item.uuid }}{% endif %} {{ item.device }}
with_items: "{{ swap_devices }}" with_items: "{{ swap_devices }}"
when: when:
swap_devices_state == "formated"
- swap_devices_state == "formated"
- item.format | default(true)


- name: fstab for swap devices - name: fstab for swap devices
mount: mount:
name: none name: none
src: UUID={{ item.uuid }}
src: "{% if item.uuid is defined %}UUID={{ item.uuid }}{% else %}{{ item.device }}{% endif %}"
fstype: swap fstype: swap
opts: sw opts: sw
passno: 0
dump: 0
passno: '0'
dump: '0'
state: present state: present
fstab: "{{ fstab_file }}" fstab: "{{ fstab_file }}"
with_items: "{{ swap_devices }}" with_items: "{{ swap_devices }}"


Loading…
Cancel
Save