---
# Adjusting other settings due to unattended installation

- name: Adjusting connections for NetworkManager
  lineinfile:
    dest: /etc/network/interfaces
    regexp: "{{ item }}"
    state: absent
  when: ansible_product_name != "VirtualBox"
  with_items:
    - '^auto eth0'
    - '^iface eth0'

- name: Correcting keyboard layout
  copy:
    src: org.freedesktop.ibus.general.gschema.override
    dest: /usr/share/glib-2.0/schemas/org.freedesktop.ibus.general.gschema.override
  tags:
    - keyboard-layout

- name: Recompiling glib2 schemas
  shell: glib-compile-schemas --strict /usr/share/glib-2.0/schemas/
  sudo: yes
  tags:
    - keyboard-layout