0

I am trying to create a simple redis cache on azure via ansible. Here's my code:

- name: Create an Azure Cache for Redis
  azure_rm_rediscache:
  resource_group: 'dev-rg
  name: 'dev-cache'
  sku:
   name: basic
   size: C1

But, I'm having this error: TypeError: RedisManagementClient.init() got an unexpected keyword argument 'credential'

I tried changing the azure-mgmt-redis version that was initially 5.0.0 but always the same error.

  • Please make sure you are using the latest versions of 1) ansible(-core) 2) the azure collection 3) the required python dependencies before going on with this question. – Zeitounator Nov 24 '22 at 16:57
  • I have verified that, all of the packages are with the latest versions. – Marwen Taallah Nov 25 '22 at 15:23
  • You have verified that on the target server that executes the module and for the target python version ansible is using on that server? – Zeitounator Nov 25 '22 at 16:21
  • Yes, I'm executing the task on localhost. – Marwen Taallah Nov 25 '22 at 16:40
  • localhost as controler can run a different python than localhost as a target. You want to have everything up-to-date in the target python. This is a common misunderstanding in ansible hence why I'm extra cautious. – Zeitounator Nov 25 '22 at 16:52

0 Answers0