Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tasks file
---
- name: install dependencies

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.apt:
name: "{{ swapfile_dependencies }}"
state: "{{ apt_install_state | default('latest') }}"
Expand All @@ -12,13 +12,13 @@
- swapfile-install
- swapfile-install-dependencies

- name: swap file

Check warning on line 15 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
when: not swapfile_size | bool
tags:
- configuration
- swapfile
block:
- name: write swap file # noqa command-instead-of-module

Check warning on line 21 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.command: >
fallocate -l {{ swapfile_size }} {{ swapfile_file }}
args:
Expand All @@ -27,7 +27,7 @@
tags:
- swapfile-write-file

- name: set swap file permissions

Check warning on line 30 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.file:
path: "{{ swapfile_file }}"
owner: root
Expand All @@ -35,25 +35,26 @@
mode: '0600'
tags:
- swapfile-set-file-permissions
when: not ansible_check_mode

- name: create swap file # noqa command-instead-of-module

Check warning on line 40 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.command: >
mkswap {{ swapfile_file }}
register: _create_swapfile
changed_when: true
when: _write_swapfile is changed

Check warning on line 45 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

no-handler

Tasks that run when changed should likely be handlers.
tags:
- swapfile-mkswap

- name: enable swapfile # noqa command-instead-of-module

Check warning on line 49 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.command: >
swapon {{ swapfile_file }}
changed_when: true
when: _create_swapfile is changed

Check warning on line 53 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

no-handler

Tasks that run when changed should likely be handlers.
tags:
- swapfile-enable-swapfile

- name: add swapfile to /etc/fstab

Check warning on line 57 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.posix.mount:
name: none
src: "{{ swapfile_file }}"
Expand Down
Loading