From e31dbf6d3d67881bc2afe66588a171ae91f89b57 Mon Sep 17 00:00:00 2001 From: Charles Crete Date: Sat, 10 Feb 2018 17:18:11 -0500 Subject: [PATCH 1/7] Move ansible to own branch --- README.md | 18 ------------------ ansible-swap/server.yml | 6 ------ ansible-swap/tasks/main.yml | 5 ----- 3 files changed, 29 deletions(-) delete mode 100644 ansible-swap/server.yml delete mode 100644 ansible-swap/tasks/main.yml diff --git a/README.md b/README.md index 780029d..5ad47f9 100644 --- a/README.md +++ b/README.md @@ -27,21 +27,3 @@ The default path for the swap file is /swapfile. If you wish to change this, sim ``` sh swap 4G /mynewswapfile ``` - -## Ansible - -Ansible Playbook collection to make things easier and faster - -### Run Playbook - -`ansible-playbook -i '0.0.0.0' ansible-swap/server.yml` - -With the server's IP. - - -### Changes to be made as required - -`ansible-swap/tasks/main.yml` - -1. Change location - location on your server/instance -2. Change Memory to be allocated diff --git a/ansible-swap/server.yml b/ansible-swap/server.yml deleted file mode 100644 index 0dc34ba..0000000 --- a/ansible-swap/server.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- hosts: all - remote_user: ubuntu - sudo: true - roles: - - ansible-swap \ No newline at end of file diff --git a/ansible-swap/tasks/main.yml b/ansible-swap/tasks/main.yml deleted file mode 100644 index 2d203ba..0000000 --- a/ansible-swap/tasks/main.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Download Swap File - get_url: url=https://raw.githubusercontent.com/Cretezy/Swap/master/swap.sh dest=/home/ubuntu mode=0440 - -- name: Setup Swap - command: sh swap.sh 2G # Define memory amount you wish to allocate From c49d35d5ac2b3984aaa4380b7a96c11ca2b4acb8 Mon Sep 17 00:00:00 2001 From: Charles Crete Date: Thu, 16 Aug 2018 22:31:40 -0400 Subject: [PATCH 2/7] Fix small comment typos --- swap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swap.sh b/swap.sh index f45a360..56c1482 100644 --- a/swap.sh +++ b/swap.sh @@ -30,8 +30,8 @@ fi ## Run sudo fallocate -l $SWAP_SIZE $SWAP_PATH # Allocate size -sudo chmod 600 $SWAP_PATH # Make it non-world readable (bad!) -sudo mkswap $SWAP_PATH # Setup swap" +sudo chmod 600 $SWAP_PATH # Set proper permission +sudo mkswap $SWAP_PATH # Setup swap sudo swapon $SWAP_PATH # Enable swap echo "$SWAP_PATH none swap sw 0 0" | sudo tee /etc/fstab -a # Add to fstab From 7cb9aea53b1187a2bc80f56548afa5b99f0e23b1 Mon Sep 17 00:00:00 2001 From: Charles Crete Date: Thu, 16 Aug 2018 22:34:02 -0400 Subject: [PATCH 3/7] Add curl download --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ad47f9..8f5f880 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,13 @@ Disclamer: This script may not work on every GNU/Linux distro. Sorry. First of all, download the main script: ``` wget https://raw.githubusercontent.com/Cretezy/Swap/master/swap.sh -O swap +# or +curl https://raw.githubusercontent.com/Cretezy/Swap/master/swap.sh -o swap ``` Then simply run the file with this format: ``` -sh swap {size} +sh swap ``` Example (with 4G): @@ -25,5 +27,5 @@ sh swap 4G The default path for the swap file is /swapfile. If you wish to change this, simple the file location (file must not exist) add it to the command: ``` -sh swap 4G /mynewswapfile +sh swap 4G /swap ``` From 8edf2f7905a6f84f91edb550c0e35f2a2f310758 Mon Sep 17 00:00:00 2001 From: Charles Crete Date: Tue, 18 Jun 2019 21:36:35 -0400 Subject: [PATCH 4/7] Delete .gitignore --- .gitignore | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f528245..0000000 --- a/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -# See https://help.github.com/articles/ignoring-files for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' - -# Ignore all logfiles and tempfiles. -/log/* -!/log/.keep -tmp -/.idea/* - From fc592939fe56f2919af430f0c6146b9a479f6866 Mon Sep 17 00:00:00 2001 From: Sosnus Date: Tue, 16 May 2023 01:28:25 +0200 Subject: [PATCH 5/7] Update README.md (#5) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8f5f880..e65d383 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,11 @@ Disclamer: This script may not work on every GNU/Linux distro. Sorry. ## Usage -First of all, download the main script: +First of all, download the main script using `wget` or `curl`: ``` wget https://raw.githubusercontent.com/Cretezy/Swap/master/swap.sh -O swap -# or -curl https://raw.githubusercontent.com/Cretezy/Swap/master/swap.sh -o swap +# or using cur: +# curl https://raw.githubusercontent.com/Cretezy/Swap/master/swap.sh -o swap ``` Then simply run the file with this format: From 01e3131dfe74e690396bcbf2bd233e084bc6525c Mon Sep 17 00:00:00 2001 From: Cretezy Date: Wed, 9 Aug 2023 13:37:56 -0400 Subject: [PATCH 6/7] Fix curl typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e65d383..e4a97c1 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Disclamer: This script may not work on every GNU/Linux distro. Sorry. First of all, download the main script using `wget` or `curl`: ``` wget https://raw.githubusercontent.com/Cretezy/Swap/master/swap.sh -O swap -# or using cur: +# or using curl: # curl https://raw.githubusercontent.com/Cretezy/Swap/master/swap.sh -o swap ``` From 3fd549fd031062c86f4bbf39a864777655a149c0 Mon Sep 17 00:00:00 2001 From: maryzhon <146766119+maryzhon@users.noreply.github.com> Date: Tue, 3 Oct 2023 08:16:05 +0700 Subject: [PATCH 7/7] Create main.yml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1 @@ +