Ansible role to manage macOS timezone settings.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
defaults
meta
tasks
tests
.gitignore
.travis.yml
LICENSE
README.md

README.md

ansible-macos-timezone

Ansible role to manage timezone settings in macOS.

Build Status Github All Releases GitHub forks GitHub stars GitHub watchers Twitter Follow License

Requirements

  • Ansible 2.3

ansible.cfg

hash_behaviour = merge

Install

Just add the role to your requirements.yml file:

- src: https://github.com/feffi/ansible-macos-timezone.git
  name: feffi.macos-timezone

Role Variables

All role based variables are listed below, along with default values:

---
macos_timezone:
  # Set the timezone; see `systemsetup -listtimezones` for other values
  timezone: "Europe/Berlin"

  # Set 24-Hour time scale
  twentyfour: true

  # Set the current locale
  locale: "de_DE"

  # Set the current currency
  currency: "EUR"

  # Set available default languages
  languages: [ "de", "en" ]

  # Set locale to metric units scale
  use_metric_units: true

  # Set the current measurement units
  measurement_units: "Centimeters"

  # Set the current temperature unit
  temperature_units: "Celsius"

Dependencies

None.

Example Playbook

    - hosts: all
      vars:
        macos_timezone:
          timezone: "Europe/Berlin"
          twentyfour: true
          locale: "de_DE"
          currency: "EUR"
          languages: [ "de", "en" ]
          use_metric_units: true
          measurement_units: "Centimeters"
          temperature_units: "Celsius"
      roles:
        - { role: feffi.macos-timezone }

Or with local parameters:

    - hosts: all
      roles:
        - { role: feffi.macos-timezone,
            macos_timezone: {
              timezone: "Europe/Berlin",
              twentyfour: true,
              locale: "de_DE",
              currency: "EUR",
              languages: [ "de", "en" ],
              use_metric_units: true,
              measurement_units: "Centimeters",
              temperature_units: "Celsius"
            }
          }