---
- hosts: all
gather_facts: false
user: ubuntu
vars:
tokens_file: /tmp/tokens.yml
tasks:
- debug: msg="{{ lookup('file', '{{ tokens_file }}' ) }}"
$ ansible-playbook -i host -vvv test_lookup.yaml
PLAY [all] ********************************************************************
ERROR: /private/tmp/{{tokens_file}} does not exist
- name: register slave on Jenkins master
local_action: uri user={{ jenkins.admin }} password={{ jenkins.password }} method=POST url="http://{{ jenkins.master_host }}:{{ jenkins.master_port }}/computer/doCreateItem?name={{ node_name }}&type=hudson.slaves.DumbSlave&json={{ lookup('file', '/tmp/{{ node_name }}_newslave.json' )|urlencode }}" force_basic_auth=yes return_content=yes status_code=302
tags:
- jenkins_slave
- setup
when: '"{{ node_name }}" not in "{{ node_query.json.computer|map(attribute="displayName")|list }}"'
--
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-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.