I am using assemble module to make one file from multiple files. I have a 
list of files and from that list I want only .pub files to be assembled, 
but I am not sure how to use this.


list of files:

root_rsa_comiskey-v01
root_rsa_comiskey-v01.pub
root_rsa_comiskey-v02
root_rsa_comiskey-v02.pub
root_rsa_comiskey-v03
root_rsa_comiskey-v03.pub
root_rsa_comiskey-v05
root_rsa_comiskey-v05.pub


Playbook file:

---
- hosts: localhost
  become_user: yes
  tasks:
  - name: list files
    shell: ls -1 /tmp/root_ssh_key*
    register: dumpfiles

  - name: fetch files
    assemble: src=/tmp/root_ssh_key/ dest=/tmp/root_ssh_key/id_rsa 
regexp='(*.pub)'
    register: test

  - debug: var=test

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/15cf7ef0-1ae4-4934-8c42-f4d8738af899%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to