Forum Discussion

aproctor_383334's avatar
aproctor_383334
Icon for Nimbostratus rankNimbostratus
Feb 08, 2019

Difficulty setting timezone with Ansible and group_vars

BIG-IP v 12.1, ansible v2.7.6, f5-sdk 3.0.20

I have an ansible playbook that configures a BIG-IP device. As part of the setup I am using the bigip_device_ntp module to set the timezone. If I specify the variable directly in the playbook, it works, i.e. like this:

- name: Configure NTP server on BIG-IP
  bigip_device_ntp:
    provider:
      user: "{{ bigip_username }}"
      password: "{{ bigip_password }}"
      server: "{{ ansible_ssh_host }}"
      server_port: "{{ bigip_server_port }}"
      validate_certs: no
    ntp_servers: "{{ ntp_servers }}"
    timezone: "America/New_York"
  delegate_to: localhost
  tags: "ntp"

However if I put the timezone variable in group_vars and have timezone: "{{ group_timezone }}"

in the playbook, I get

Application error for confpp: ['America/New_York'] is not a valid time zone.

I've tried with single quotes, double quotes and no quotes, doesn't seem to make a difference.

Can someone point me in the right direction please?!

No RepliesBe the first to reply