Improve Xtesting installation procedure 69/107569/1
authorguillaume.lambert <guillaume.lambert@orange.com>
Wed, 30 Aug 2023 09:37:29 +0000 (11:37 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Wed, 30 Aug 2023 09:47:49 +0000 (11:47 +0200)
- use a requirements.yml file to install ansible roles and collections

https://github.com/collivier/ansible-role-xtesting/pull/19 has been
fixed in the master branch
cf commit 1a5794a34beada2a2e69b9d46f933f2a286774e9

- remove related workaround notes from INSTALL.txt
- force to use collivier.xtesting master branch repo in requirements.yml
  until the fix is published in ansible official catalog

Change-Id: Ia4e33d5ea327bffef7ed214907823e2ee77e87b7

tests/Xtesting/INSTALL.txt
tests/Xtesting/requirements.yml [new file with mode: 0644]

index eb47e85e38423d01a94e5028958b67c140c8b58b..2ee3a5eacbcf824621b6a5bfa3b4457b52fed6df 100644 (file)
@@ -9,11 +9,7 @@ sudo apt-get install virtualenv
 virtualenv xtesting -p python3 --system-site-packages
 . xtesting/bin/activate
 pip install ansible
-ansible-galaxy install collivier.xtesting
-## Until https://github.com/collivier/ansible-role-xtesting/pull/19 is fixed, the following command
-## or any equivalent must be performed so that the playbook correctly performs Jenkins configuration
-## sed -i_ 's/port\:{/port: {/' ~/.ansible/roles/collivier.xtesting/templates/run.yaml.j2
-ansible-galaxy collection install ansible.posix community.general community.grafana community.kubernetes community.docker community.postgresql
+ansible-galaxy install -r requirements.yml
 ansible-playbook site.yml
 deactivate
 sudo docker build -t 127.0.0.1:5000/tpce0 .
diff --git a/tests/Xtesting/requirements.yml b/tests/Xtesting/requirements.yml
new file mode 100644 (file)
index 0000000..a546126
--- /dev/null
@@ -0,0 +1,16 @@
+---
+roles:
+  - name: collivier.xtesting
+    src: https://github.com/collivier/ansible-role-xtesting
+    version: master
+  # to use xtesting GitHub repo master branch until a version > 4.2.0
+  # is published in ansible catalog to bring the following fix
+  # https://github.com/collivier/ansible-role-xtesting/pull/19
+
+collections:
+  - name: ansible.posix
+  - name: community.general
+  - name: community.grafana
+  - name: community.kubernetes
+  - name: community.docker
+  - name: community.postgresql