---
- name: Make sure central_server fingerprint is known
  shell: ssh-keyscan -H {{ central_server }} > /etc/ssh/ssh_known_hosts

- name: Configure logrotate to handle our custom logs.
  template: src={{ item.src }} dest=/etc/logrotate.d/{{ item.dest }} owner=root group=root mode=0644
  with_items:
    - src: 000-dateext-for-all.j2
      dest: 000-dateext-for-all
    - src: ansible-pull.logrotate.j2
      dest: ansible-pull
    - src: dpkg-list.logrotate.j2
      dest: dpkg-list
    - src: pip-freeze.logrotate.j2
      dest: pip-freeze

- name: copy hdw info script
  copy: src=hdw_info.sh dest=/home/ideascube/hdw_info.sh mode=755

- name: copy test_zim_migration.sh script
  template: src=test_zim_migration.sh.j2 dest=/home/ideascube/test_zim_migration.sh mode=755

- name: Copy push_log.sh
  template: src=push_log.sh.j2 dest=/etc/dhcp/dhclient-exit-hooks.d/push_log mode=755

---
- include_vars: group_vars/{{ ansible_architecture }}.yml

- name: Make sure central_server fingerprint is known
  shell: ssh-keyscan -H {{ central_server }} > /etc/ssh/ssh_known_hosts

- name: Configure logrotate to handle our custom logs.
  template: src={{ item.src }} dest=/etc/logrotate.d/{{ item.dest }} owner=root group=root mode=0644
  with_items:
    - src: 000-dateext-for-all.j2
      dest: 000-dateext-for-all
    - src: ansible-pull.logrotate.j2
      dest: ansible-pull
    - src: dpkg-list.logrotate.j2
      dest: dpkg-list
    - src: pip-freeze.logrotate.j2
      dest: pip-freeze

- name: copy hdw info script
  copy: src=hdw_info.sh dest=/home/ideascube/hdw_info.sh mode=755

- name: copy test_zim_migration.sh script
  template: src=test_zim_migration.sh.j2 dest=/home/ideascube/test_zim_migration.sh mode=755

- name: Copy push_log.sh
  template: src=push_log.sh.j2 dest=/etc/dhcp/dhclient-exit-hooks.d/push_log mode=755

Include vars for the right ansible_architecture
Include vars for the right ansible_architecture
