--- - hosts: "{{ variable_host | default(lab15_standard) }}" gather_facts: no become: yes tasks: - name: Remove old configuration lineinfile: path: /etc/default/locale regexp: 'pl_PL.UTF-8' state: absent - name: Add LANG=pl_PL.UFT-8 ini_file: path: /etc/default/locale section: null option: LANG value: pl_PL.UTF-8 state: present