Problem Set timezone for Ubuntu.

Hello together !
Maybe someone can help me. I want to change the timezone for my Linux VMs.
This is my Playbook.

  • name: Linux Updates installieren

hosts: lx_svr

become: yes

become_user: root

gather_facts: False

collections:

  • community.general.timezone

tasks:

  • name: Set timezone to Europe/Berlin

community.general.timezone:

name: Europe/Berlin

I get this error every time:

ERROR! couldn’t resolve module/action ‘community.general.timezone’. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in ‘/runner/project/linux_playbooks/set_timezone.yaml’: line 9, column 7, but may

be elsewhere in the file depending on the exact syntax problem.

Greez

Chris

Hi!

community.general modules are not installed in the awx-ee image, so you will need to add a collections/requirements.yml file to the root of your project folder that has the specific module you need, or create your own execution environment using ansible builder.

see https://docs.ansible.com/automation-controller/latest/html/userguide/projects.html#collections-support

and https://ansible-builder.readthedocs.io/en/stable/