---
- hosts: localhost
  become: true
  tasks:
  - name: Create config directory
    file:
      state: directory
      owner: root
      group: root
      mode: 0755
      path: "{{ rock_conf_dir }}"

  - name: Render template
    template:
      backup: true
      src: rock_config.yml.j2
      dest: "{{ rock_config }}"
      owner: root
      group: root
      mode: 0644

---
- hosts: localhost
  become: true
  vars:
    - config_src: rock_config.yml.j2
  tasks:
  - name: Create config directory
    file:
      state: directory
      owner: root
      group: root
      mode: 0755
      path: "{{ rock_conf_dir }}"

  - name: Render template
    template:
      backup: true
      src: "{{ config_src }}"
      dest: "{{ rock_config }}"
      owner: root
      group: root
      mode: 0644

Add support for overriding source file
Add support for overriding source file
