Skip to content

Instantly share code, notes, and snippets.

@adenot
Created January 19, 2014 08:10
Show Gist options
  • Select an option

  • Save adenot/8501849 to your computer and use it in GitHub Desktop.

Select an option

Save adenot/8501849 to your computer and use it in GitHub Desktop.
Ansible playbook: Generates a new locale only if it was not generated before
- name: Check for pt_BR locale
shell: grep pt_BR /var/lib/locales/supported.d/local
register: locale_pt_BR
ignore_errors: true
changed_when: false
- name: Create pt_BR locale
shell: locale-gen pt_BR.UTF-8
when: locale_pt_BR.rc == 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment