Ansible and CVS integration

113 views
Skip to first unread message

vu001

unread,
Feb 6, 2017, 10:41:34 AM2/6/17
to Ansible Project
Hi to all...

I've created set of templates which I use to deploy some application config files (between 20-30 files, depends on environment) to all my servers (about 100 servers).

From ansible server I deploy every changed config file.

---
- name: Generate configuration files
  template:
     src={{ item.1 }}.j2
     dest={{item.0.HOME_DIR}}/{{ item.1 }}
     backup=yes
  with_subelements:
    - "{{MEMBERS_LIST}}"
    - config_files


So after I deploy that config file, I would like to commit it to CVS. Any idea how to do that.
My idea is to check out CVS structure to ansible server, and every time I run this play to check out all committed config files, and in that structure where are current in use config files  checked out from CVS deploy newly generated config files. 
But how to achieve that?
 If I add new play in upper playbook then config files are copied to the remote server, and I would like to copy that to ansible server from where I run this play.

Or is it possible somehow notify (with handlers) when some files are changed and then copy that file to some location on ansible server (where CVS structure is checked out) 
Any idea is welcome.
Thanks

Johannes Kastl

unread,
Feb 9, 2017, 2:21:54 AM2/9/17
to ansible...@googlegroups.com
On 06.02.17 16:41 vu001 wrote:

> I've created set of templates which I use to deploy some
> application config files (between 20-30 files, depends on
> environment) to all my servers (about 100 servers).

OK.

> So after I deploy that config file, I would like to commit it to
> CVS.

I'm sorry, I read your mail multiple times, but I'm not sure what you
want to achieve.

Do you want to put the files on the ansible host (the one where you
are calling the playbook) into CVS? Or on each of your 100 servers?

What do you want to achieve?

Also (and without the intention of bikeshedding or flaming):
Is there any special reason for choosing CVS over more, ahem, modern
things like git, svn and such?

Johannes

signature.asc
Reply all
Reply to author
Forward
0 new messages