get_url is not a valid attribute for play

1,311 views
Skip to first unread message

darknight

unread,
Apr 18, 2016, 3:55:43 PM4/18/16
to Ansible Project
Hi,

I am totally confused about why i cannot use the get_url attribute in a play i was writing. I get the above error when i try to run the play-book. I am not sure why this is happening and i am totally lost of whats wrong here. can any one let me know whats going here.Thanks


- name: Download newrelic
  get_url:
    url=https://download.newrelic.com/debian/dists/newrelic/non-free/binary-amd64/newrelic-daemon_6.2.0.158_amd64.deb
    dest=/usr/local/tmp/newrelic-daemon_6.2.0.158_amd64.deb
    mode=0755



J Hawkesworth

unread,
Apr 19, 2016, 3:51:49 AM4/19/16
to Ansible Project
Hi,

I think the problem is you are attempting to use key=value but this needs to be key: value when you are using the 1 module argument per line (also known as yaml style) in your playbook.

I do this all the time when converting module calls (and ansible one-liners) into my playbooks

Try

- name: Download newrelic
  get_url:
    url: https://download.newrelic.com/debian/dists/newrelic/non-free/binary-amd64/newrelic-daemon_6.2.0.158_amd64.deb
    dest: /usr/local/tmp/newrelic-daemon_6.2.0.158_amd64.deb
    mode: 0755

Hope this helps,

Jon
Reply all
Reply to author
Forward
0 new messages