2019-03-09 00:31:38 +00:00
|
|
|
---
|
2019-03-16 20:35:27 +00:00
|
|
|
- name: gather OS specific variables
|
2022-08-31 03:19:06 +00:00
|
|
|
ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', params) }}"
|
|
|
|
vars:
|
|
|
|
params:
|
|
|
|
files:
|
|
|
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
|
|
|
- "{{ ansible_distribution }}.yaml"
|
|
|
|
- "{{ ansible_os_family }}.yaml"
|
|
|
|
- "default.yaml"
|
|
|
|
paths:
|
|
|
|
- vars
|
2019-03-16 20:35:27 +00:00
|
|
|
|
2019-10-27 23:38:54 +00:00
|
|
|
- name: run os specific tasks
|
2022-08-31 03:19:06 +00:00
|
|
|
ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', params) }}"
|
|
|
|
vars:
|
|
|
|
params:
|
|
|
|
files:
|
|
|
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
|
|
|
- "{{ ansible_distribution }}.yaml"
|
|
|
|
- "{{ ansible_os_family }}.yaml"
|
|
|
|
- "default.yaml"
|
|
|
|
paths:
|
|
|
|
- tasks
|
2019-10-27 23:38:54 +00:00
|
|
|
|
|
|
|
- name: set hostname
|
2022-09-01 22:12:52 +00:00
|
|
|
ansible.builtin.hostname:
|
|
|
|
name: "{{ common_hostname | default(inventory_hostname) }}"
|
2019-10-27 23:38:54 +00:00
|
|
|
|
2019-03-16 20:35:27 +00:00
|
|
|
- name: configure system timezone
|
2022-09-01 22:12:52 +00:00
|
|
|
ansible.builtin.timezone:
|
|
|
|
name: "{{ common_timezone | default('Etc/UTC') }}"
|
2019-03-16 20:35:27 +00:00
|
|
|
notify: restart cron
|
2019-03-27 07:08:13 +00:00
|
|
|
|
2022-09-01 22:12:52 +00:00
|
|
|
- name: configure system locale
|
|
|
|
ansible.builtin.command:
|
|
|
|
cmd: "localectl set-locale {{ common_locale | default('C.UTF-8') }}"
|
|
|
|
when: ansible_facts.env.LANG != (common_locale | default('C.UTF-8'))
|
|
|
|
|
2019-03-27 07:08:13 +00:00
|
|
|
# vim:ft=yaml.ansible:
|