# Gettting idempotent error while testing using molecule in travis ci

**URL:** <https://forum.ansible.com/t/gettting-idempotent-error-while-testing-using-molecule-in-travis-ci/29447>\
**Category:** Ansible Project\
**Tags:** ansible-lint\
**Created:** [January 16, 2019, 6:30am UTC](https://forum.ansible.com/t/gettting-idempotent-error-while-testing-using-molecule-in-travis-ci/29447 "2019-01-16T06:30:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemanth22](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/hemanth22/32/9298_2.png) [@hemanth22](https://forum.ansible.com/u/hemanth22)\
**Post date:** [January 16, 2019, 6:30am UTC](https://forum.ansible.com/t/gettting-idempotent-error-while-testing-using-molecule-in-travis-ci/29447/1 "2019-01-16T06:30:44Z")

</div>

Hello team,

i have added creates argument for the command modules as below for idempotent test, this ansible role is working good when tested in vagrant environment.

> - name: Cloning a repository  
> git:  
> repo: “{{ ci\_repo }}”  
> dest: “{{ ci\_path }}”  
> clone: true  
> version: “{{ ci\_branch }}”  
> register: cloning  
> when: foldercreate.changed  
> tags:
> - ci
> - skip\_ansible\_lint
> - name: Compile with maven  
> command: “{{ maven\_create\_command }}”  
> args:  
> chdir: “{{ ci\_path }}”  
> creates: “{{ ci\_path }}”  
> warn: false  
> when: cloning.changed  
> tags:
> - ci
> - skip\_ansible\_lint
> - name: Testing with maven  
> command: “{{ maven\_test\_command }}”  
> args:  
> chdir: “{{ ci\_path }}”  
> creates: “{{ ci\_path }}”  
> warn: false  
> when: cloning.changed  
> tags:
> - ci
> - skip\_ansible\_lint
> - name: Packing with maven  
> command: “{{ maven\_artifacts\_command }}”  
> args:  
> chdir: “{{ ci\_path }}”  
> creates: “{{ ci\_path }}”  
> warn: false  
> when: cloning.changed  
> tags:
> - ci
> - skip\_ansible\_lint’

when tested in travis ci using molecule for ansible lint.

> → Scenario: ‘default’  
> → Action: ‘idempotence’  
> ERROR: Idempotence test failed because of the following tasks:
> 
> - [instance] =\> hemanth22.ci : Creating a test directory
> - [instance] =\> hemanth22.ci : Cloning a repository
> - [instance] =\> hemanth22.ci : Compile program with maven
> - [instance] =\> hemanth22.ci : Testing program with maven
> - [instance] =\> hemanth22.ci : Packing program with maven
> - [instance] =\> hemanth22.ci : Destroying test directory  
> An error occurred during the test sequence action: ‘idempotence’. Cleaning up.

Can you please advice.

Thanks,  
Hemanth.
