--- # Note that we assume this file exists! lineinfile will fail if the file is # not present. - name: "OMZ | export vars to .zshrc if required." blockinfile: dest: "{{ omz_user_zshrc_path }}" block: "{{ omz_user.settings }}" backup: "{{ omz_zshrc_backup }}" when: - "omz_user.settings is defined" # Don't flag this line for checking if the value is empty--checking for an # empty value makes perfect sense. - "omz_user.settings != ''" # noqa 602 - "not omz_zshrc_create"