Skip to content

Commit

Permalink
grow swapfile on mon server
Browse files Browse the repository at this point in the history
  • Loading branch information
YanChii committed Apr 4, 2017
1 parent 624454e commit 8d327af
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
File renamed without changes.
21 changes: 21 additions & 0 deletions ans/upgrade/mon/v2.5.2/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,24 @@
copy: src="{{ current_task_dir }}/files/ludolph.service"
dest="/etc/systemd/system/ludolph.service"
notify: reload systemd


# https://github.com/erigones/esdc-ce/issues/103
- name: Create swapfile
command: "dd if=/dev/zero of=/swapfile2 bs=1M count=1534 creates=/swapfile2"
register: write_swapfile

- name: Set swapfile permissions
file: path="/swapfile2" mode=600

- name: Build swapfile
command: "mkswap /swapfile2"
register: create_swapfile
when: write_swapfile.changed

- name: Enable swapfile
command: "swapon /swapfile2"
when: create_swapfile.changed

- name: Add swapfile to /etc/fstab
lineinfile: dest=/etc/fstab line="/swapfile2 none swap sw 0 0" state=present

1 comment on commit 8d327af

@YanChii
Copy link
Contributor Author

@YanChii YanChii commented on 8d327af Apr 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolves #103

Please sign in to comment.