Hey guys,
So I have a project setup in the following way:
- requiring an external redis-server role
- my own role called redis-cluster-shard that uses redis-server as a dependency
- a playbook that applies this role twice to the same node. Like this:
`
- role: “rds-cache-shard”
rds_port: 7000 - role: “rds-cache-shard”
rds_port: 7001
`
The way a redis install is created is through the dependency in meta/main.ytml, which looks like this:
`
dependencies:
- role: redis-server
redis_service_name: “rds_shard_{{rds_port}}”
redis_logfile: “/var/log/rds_shard_{{rds_port}}.log”
redis_clustermode_enabled: “yes”
redis_port: “{{rds_port|int}}”
redis_save: - 3600 1
`
The problem I’m having is that only one redis shard is created. IE the dependency only runs once, on the first rds-cache-shard include.
Am I doing something wrong? I’d expect the dependency tasks to run each and every time a role is included, especially as I’m scoping it with variables (rds_port).