ok, for the record, here is what i ended up with

---
- hosts: ubuntu:debian

  tasks:

  - name: run syslog-ng --version
    command: syslog-ng --version
    register: ver_out
    changed_when: false

  - name: set ver
    set_fact: ver="{{ ver_out.stdout.splitlines()[0]|regex_replace('[^\d.]+', 
'') }}"

  - name: push syslog-ng.conf
    copy: src=files/linux/syslog-ng.conf-{{ ver }}
          dest=/etc/syslog-ng/syslog-ng.conf
          mode=644
          owner=root
          group={{root_group}}
    notify: restart syslogng



randy

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/m28ucy5vty.wl%25randy%40psg.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to