From 033589b22a05aea8240bbd398c61f6af08d0b50b Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 30 Aug 2024 00:26:14 +0100 Subject: [PATCH] ansible: add swap to DigitalOcean Ubuntu 22.04 --- ansible/inventory.yml | 4 ++-- ansible/roles/bootstrap/tasks/partials/ubuntu2204.yml | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 ansible/roles/bootstrap/tasks/partials/ubuntu2204.yml diff --git a/ansible/inventory.yml b/ansible/inventory.yml index 715973347..313384a9d 100644 --- a/ansible/inventory.yml +++ b/ansible/inventory.yml @@ -127,8 +127,8 @@ hosts: ubuntu2204_docker-x64-1: {ip: 134.209.55.216} ubuntu2204_docker-x64-2: {ip: 159.89.183.200} ubuntu1804-x64-1: {ip: 178.128.181.213} - ubuntu2204-x64-1: {ip: 138.197.4.1} - ubuntu2204-x64-2: {ip: 167.99.124.188} + ubuntu2204-x64-1: {ip: 138.197.4.1, swap_file_size_mb: 2048} + ubuntu2204-x64-2: {ip: 167.99.124.188, swap_file_size_mb: 2048} - equinix: ubuntu2004_docker-arm64-1: {ip: 145.40.81.219} diff --git a/ansible/roles/bootstrap/tasks/partials/ubuntu2204.yml b/ansible/roles/bootstrap/tasks/partials/ubuntu2204.yml new file mode 100644 index 000000000..222997a3f --- /dev/null +++ b/ansible/roles/bootstrap/tasks/partials/ubuntu2204.yml @@ -0,0 +1,9 @@ +--- + +# +# Ubuntu 22.04 +# + +- name: set up swap on Linux + include_tasks: linux-swap.yml + when: swap_file_size_mb is defined