[feature request] module assemble

45 views
Skip to first unread message

wojtas

unread,
Jun 23, 2015, 9:55:57 AM6/23/15
to ansible...@googlegroups.com
Hi,
Is there any possibility to add now  feature to assemble?
I would like have smt like mix of subversion and assemble.
Config files are kept in SVN and make from one folder a single file.
playbook can look like that

- hosts: all
  tasks:
    - assemble:
         src=repo+http://svn.example.com/svn/backup_config/ username=USER password=PASS
         dest=/etc/cron.d/backup_disk

or even a normal http recursive request will good to ( but please notice the htbasic ).

Thanks from advice.




Brian Coca

unread,
Jun 23, 2015, 10:02:56 AM6/23/15
to ansible...@googlegroups.com
or just use 2 tasks, svn task to checkout files, assemble task to use them?

------
Brian Coca 


--
Brian Coca

wojtas

unread,
Jun 29, 2015, 7:43:53 AM6/29/15
to ansible...@googlegroups.com
Hi Brian
Yes i did smt like that, but i have a problem with file lookup's.
What I want to make is
- checkout repo (simple)
- root is static (assmble from /SVN_PATH/keys/root/* to /root/.ssh/auth_keys)
- for $(ls -1 /SVN_PATH/keys/ |grep -v root) ;do assemble /home/username_from_for_loop/.ssh/auth_keys;done
(that is tricky one and i have no idea how can manage to do that).

Can You help me with that, please ?

Brian Coca

unread,
Jun 29, 2015, 8:49:48 AM6/29/15
to ansible...@googlegroups.com
lookup('pipe','ls -1 /SVN_PATH/keys/ |grep -v root') ?
> --
> 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.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/1919d557-a293-47f2-a368-ab7837ddaf9f%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca

wojtas

unread,
Jun 29, 2015, 9:05:16 AM6/29/15
to ansible...@googlegroups.com
Hi,
THX for quick answer
Sorry I'm sill beginner in ansible,
But is it possible to combine that with some loop?
In https://docs.ansible.com/playbooks_loops.html i can't see example like that
shout i use a nested (with_nested:) because it will look like
/SVN_PATH/keys/root
/SVN_PATH/keys/deploy
/SVN_PATH/keys/ubuntu
/SVN_PATH/keys/......

Brian Coca

unread,
Jun 29, 2015, 5:32:14 PM6/29/15
to ansible...@googlegroups.com
All lookups can be invoked in 2 forms lookup('<lookup>' ,. .... or
with_<lookup>, they are the same thing.

so you can use with_pipe:


--
Brian Coca
Reply all
Reply to author
Forward
0 new messages