---
# Deploy configuration files
- name: Install/Update basics input packages
  vars:
    __rsyslog_packages: "{{ __rsyslog_basics_packages }}"
    __rsyslog_rules: []
  include_tasks:
    file: "{{ role_path }}/tasks/deploy.yml"

- name: "Create basics input configuration file
    /etc/rsyslog.d/input-basics-{{ __rsyslog_input.name }}"
  vars:
    __rsyslog_packages: []
    __rsyslog_rules:
      - name: "input-basics-{{ __rsyslog_input.name }}"
        type: input
        state: "{{ __rsyslog_input.state | d('present') }}"
        sections:
          - options: "{{ lookup('template', __rsyslog_input_basics) }}"
  include_tasks:
    file: "{{ role_path }}/tasks/deploy.yml"
  when:
    - __rsyslog_input.type | d() == 'basics'
