From c2e229e351867580d7a5fbf361a15e521fd0d9f7 Mon Sep 17 00:00:00 2001 From: Kim Hammar Date: Wed, 12 Feb 2025 20:32:19 +0100 Subject: [PATCH] ansible update [WIP] --- ansible/README.md | 9 +++++++++ ansible/ansible.cfg | 1 + ansible/group_vars/all/variables.yml | 8 ++++---- ansible/install_metastore.yml | 4 ++++ ansible/install_setup.yml | 1 + ansible/install_simulation_system.yml | 1 + ansible/inventory | 2 +- 7 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ansible/README.md b/ansible/README.md index fa33b8ceb..6cb6a1583 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -90,6 +90,15 @@ After registering the variable, add it to the debug group. var: git_installation ``` +## Tests +The following table details the last time ansible was tested and worked correctly for different setups. + +| Setup | Last date tested | +|------------------------------|------------------| +| Single server, Ubuntu 22.04. | 2025-02-12 ✔ | +| Two servers, Ubuntu 20.04. | 2024-04-23 ✔ | + + ## Author & Maintainer Kim Hammar diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index 7c17e1487..6eec863cf 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -3,3 +3,4 @@ inventory = inventory private_key_file = ~/.ssh/id_rsa allow_world_readable_tmpfiles=true remote_user = kim +command_warnings = False diff --git a/ansible/group_vars/all/variables.yml b/ansible/group_vars/all/variables.yml index 2ded9a369..1f60cff67 100644 --- a/ansible/group_vars/all/variables.yml +++ b/ansible/group_vars/all/variables.yml @@ -1,7 +1,7 @@ user: "kim" csle_git_repo_url: "https://github.com/Limmen/csle" -leader_ip: "34.142.42.219" -leader_public_ip: "34.142.42.219" +leader_ip: "34.70.84.19" +leader_public_ip: "34.70.84.19" nginx_content_name: "nginx_configuration_content.txt" web_port: 7777 postgres_version: "15" @@ -57,7 +57,7 @@ csle_config: postgresql_log_dir: "/var/log/postgresql/" nginx_log_dir: "/var/log/nginx/" default_log_dir: "/tmp/csle/" - metastore_ip: "34.142.42.219" + metastore_ip: "34.70.84.19" metastore_user: "csle" metastore_password: "csle" metastore_database_name: "csle" @@ -65,7 +65,7 @@ csle_config: version: "0.8.0" cluster_config: cluster_nodes: - - ip: "34.88.71.96" + - ip: "34.70.84.19" leader: true cpus: 2 gpus: 0 diff --git a/ansible/install_metastore.yml b/ansible/install_metastore.yml index 7a0cda409..bac1eae5e 100644 --- a/ansible/install_metastore.yml +++ b/ansible/install_metastore.yml @@ -9,6 +9,7 @@ register: postgresql_installed ignore_errors: true no_log: true + failed_when: false - name: Download PostgreSQL ansible.builtin.get_url: @@ -131,6 +132,7 @@ query: "CREATE DATABASE csle" ignore_errors: true no_log: true + failed_when: false - name: Setup database privileges become: yes @@ -143,6 +145,7 @@ path: /var/lib/postgresql/create_db.sql ignore_errors: true no_log: true + failed_when: false - name: Add citus extension become: yes @@ -156,6 +159,7 @@ version: latest ignore_errors: true no_log: true + failed_when: false - name: Change mode and ownership of the /var/log/postgresql file: diff --git a/ansible/install_setup.yml b/ansible/install_setup.yml index 69244bc5f..6f43afdf6 100644 --- a/ansible/install_setup.yml +++ b/ansible/install_setup.yml @@ -35,6 +35,7 @@ register: anaconda_installed ignore_errors: true no_log: true + failed_when: false - name: Download Anaconda ansible.builtin.get_url: diff --git a/ansible/install_simulation_system.yml b/ansible/install_simulation_system.yml index 36babb2d3..1d7d01a89 100644 --- a/ansible/install_simulation_system.yml +++ b/ansible/install_simulation_system.yml @@ -48,6 +48,7 @@ args: executable: /bin/bash ignore_errors: true + no_log: true when: not python_libraries_installed - name: Modify constants.py file diff --git a/ansible/inventory b/ansible/inventory index c870cd54b..6ec7f0ad8 100644 --- a/ansible/inventory +++ b/ansible/inventory @@ -1,4 +1,4 @@ [leader] -34.88.71.96 +34.70.84.19 [worker]