# Install pmm-client using ansible playbook

**URL:** <https://forum.ansible.com/t/install-pmm-client-using-ansible-playbook/32967>\
**Category:** Ansible Project\
**Created:** [May 19, 2020, 10:54am UTC](https://forum.ansible.com/t/install-pmm-client-using-ansible-playbook/32967 "2020-05-19T10:54:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaoutar\_idbelkacem](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@kaoutar\_idbelkacem](https://forum.ansible.com/u/kaoutar_idbelkacem)\
**Post date:** [May 19, 2020, 10:54am UTC](https://forum.ansible.com/t/install-pmm-client-using-ansible-playbook/32967/1 "2020-05-19T10:54:48Z")

</div>

Hi every one in the group 🙂

I m traying to deploye pmm-client on my machine using this play book

> * * *
> 
> - hosts: all  
> become: yes  
> vars:  
> pmm\_client\_install: true  
> pmm\_client\_enabled: true  
> pmm\_client\_server\_host: _._._._  
> pmm\_client\_server\_port: 80
> 
> # If the PMM Server is using basic auth:
> 
> # Type: Bool
> 
> pmm\_client\_server\_basic\_auth: true
> 
> # Type: Str
> 
> pmm\_client\_server\_basic\_auth\_username:\*\*\*

pmm\_client\_server\_basic\_auth\_password: \*\*\*\*\*\*

> pmm\_client\_server\_use\_ssl: false  
> pmm\_client\_force\_setup: true  
> pmm\_client\_add\_services:
> 
> - mongodb  
> pmm\_client\_start\_services:
> - mongodb  
> pmm\_client\_db:  
> mongodb:  
> host: ip-of-machine  
> port: port-of-machine  
> clustername: Prod-Data  
> roles:
> - timorunge.pmm\_client

> # vim:ft=ansible:

In my /etc/ansible/hosts I have added just one machine (host)

when I execute the commande ansible-playbook name-of-playbook.yml

I have this problem

> FAILED! =\> {“msg”: “The task includes an option with an undefined variable. The error was: ‘dict object’ has no attribute ‘username’\n\nThe error appears to be in ‘/home/ops/.ansible/roles/timorunge.pmm\_client/tasks/client-services.yml’: line 41, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Adding MongoDB services to monitoring\n ^ here\n”}

Please If any one can help ?
