From 9fd262884f3592aff31755d45615b7e705254cbb Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Fri, 11 Aug 2023 11:33:25 -0400 Subject: [PATCH] Simplify integration_tests ansible playbook Instead of using tasks to include the roles, use them directly. The go role executes by default, unless the install_go variable is set to false. --- data/ansible/integration_tests/main.yaml | 41 ++++++------------------ 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/data/ansible/integration_tests/main.yaml b/data/ansible/integration_tests/main.yaml index 1a97c94d3..585756e0a 100644 --- a/data/ansible/integration_tests/main.yaml +++ b/data/ansible/integration_tests/main.yaml @@ -1,17 +1,9 @@ --- - hosts: all - tasks: - - name: Install RabbitMQ - import_role: - name: ../roles/install_rabbitmq - - - name: Install NATS - import_role: - name: ../roles/nats - - - name: Install ElasticSearch - import_role: - name: ../roles/elasticsearch + roles: + - ../roles/install_rabbitmq + - ../roles/nats + - role: ../roles/elasticsearch vars: auto_create_index: ".monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*,cdrs" @@ -21,22 +13,9 @@ # command: 'curl -X PUT "localhost:9200/cdrs?pretty"' # ignore_errors: yes - - name: Install Kafka - import_role: - name: ../roles/kafka - - - name: Install MongoDB - import_role: - name: ../roles/install_mongodb - - - name: Install PostgreSQL - import_role: - name: ../roles/postgresql - - - name: Install Go - import_role: - name: ../roles/go - - - name: Install and configure CGRateS - import_role: - name: ../roles/cgrates + - ../roles/kafka + - ../roles/install_mongodb + - ../roles/postgresql + - role: ../roles/go + when: install_go | bool | default(true) + - ../roles/cgrates