From 8921b4f8dd9d2157f5e69b3bd1b231d08c0baec3 Mon Sep 17 00:00:00 2001 From: d_auras Date: Thu, 5 Jan 2023 11:31:13 +0100 Subject: [PATCH] added test files and README, ready for pull request --- ansible/README.md | 3 +++ ansible/dev.yaml | 12 ++---------- ansible/test.inventory.ini | 2 ++ 3 files changed, 7 insertions(+), 10 deletions(-) create mode 100644 ansible/README.md create mode 100644 ansible/test.inventory.ini diff --git a/ansible/README.md b/ansible/README.md new file mode 100644 index 00000000..b15bf75c --- /dev/null +++ b/ansible/README.md @@ -0,0 +1,3 @@ +To test the ansible playbook on localhost run ```ansible-playbook -i test.inventory.ini dev.yaml```. +Point Redis Insights to the Redis database by visiting localhost:8001 in a browser and select "I already have a database" followed by "Connect to a Redis Database". +For host, port and name fill in ```oasst-redis```, ```6379``` and ```redis```. diff --git a/ansible/dev.yaml b/ansible/dev.yaml index 04252c0d..c9195966 100644 --- a/ansible/dev.yaml +++ b/ansible/dev.yaml @@ -12,8 +12,7 @@ - name: Set up Redis community.docker.docker_container: - name: redis - #name: oasst-redis + name: oasst-redis image: redis state: started restart_policy: always @@ -31,20 +30,13 @@ - name: Set up Redis Insights community.docker.docker_container: - name: redis-insights - #name: oasst-redis-insights + name: oasst-redis-insights image: redislabs/redisinsight:latest - #command: pip install redis-cli python entry.pyc state: started restart_policy: always network_mode: oasst ports: - 8001:8001 - env: - REDIS_URL: redis://redis:6379 - REDIS_HOST: redis - #environment: - #- REDIS_URL=redis://redis:6379 - name: Create postgres containers community.docker.docker_container: diff --git a/ansible/test.inventory.ini b/ansible/test.inventory.ini new file mode 100644 index 00000000..bfe6d93f --- /dev/null +++ b/ansible/test.inventory.ini @@ -0,0 +1,2 @@ +[test] +dev ansible_connection=local