updating JIRA using ansible playbooks

547 views
Skip to first unread message

anoop vc

unread,
Aug 1, 2017, 7:12:36 AM8/1/17
to Ansible Project
I am a beginner in ansible  and getting the below error while trying to update an issue in JIRA using a playbook. Can anyone help


ERROR! 'jira' is not a valid attribute for a Play


I am using the below ansible version: 

[ansible@bitbucket playbooks]$ ansible --version
/usr/bin/ansible:26: UserWarning: Module __main__ was already imported from /usr/bin/ansible, but /usr/lib/python2.6/site-packages is being added to sys.path
  import pkg_resources
ansible 2.3.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
[ansible@bitbucket playbooks]$ 

Kai Stian Olstad

unread,
Aug 1, 2017, 8:18:40 AM8/1/17
to ansible...@googlegroups.com
On 01. aug. 2017 13:12, anoop vc wrote:
> I am a beginner in ansible and getting the below error while trying to
> update an issue in JIRA using a playbook. Can anyone help
>
>
> ERROR! 'jira' is not a valid attribute for a Play

Not without you showing your code since you have an error in it.


--
Kai Stian Olstad

Guy Matz

unread,
Aug 1, 2017, 1:07:18 PM8/1/17
to ansible...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a09c75c2-d194-4a5f-8f65-d60282c87f36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

anoop vc

unread,
Aug 2, 2017, 6:19:47 AM8/2/17
to Ansible Project, ansible-pr...@olstad.com
Hi Thanks for your reply. Here is my code

--- #THis is a YAML Playbook
- name: Updating ticket on Jira (testing)
  hosts: localhost
  gather_facts: no
  tasks:
- name: Edit issue - use arguments with fields
  jira:
    username: xxx....@xxx.com
    password: xx
    issue: xxx-1
    operation: transition
    status: Done

Kai Stian Olstad

unread,
Aug 2, 2017, 7:33:42 AM8/2/17
to ansible...@googlegroups.com
On 02. aug. 2017 12:19, anoop vc wrote:
> Hi Thanks for your reply. Here is my code
>
> --- #THis is a YAML Playbook
> - name: Updating ticket on Jira (testing)
> hosts: localhost
> gather_facts: no
> tasks:
> - name: Edit issue - use arguments with fields
> jira:
> uri: https://xxx.atlassian.net/rest/api/latest/issue/
> username: xxx....@xxx.com
> password: xx
> issue: xxx-1
> operation: transition
> status: Done

Your indentation is little off. - name: Edit.. and jira module should be
a list under the tasks.
In yaml indentation is very important.

- name: Updating ticket on Jira (testing)
hosts: localhost
gather_facts: no
tasks:
- name: Edit issue - use arguments with fields
jira:
uri: https://xxx.atlassian.net/rest/api/latest/issue/
username: xxx....@xxx.com
password: xx
issue: xxx-1
operation: transition
status: Done

--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages