Роль для настройки сервера майнкрафт под Alpine Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.1 KiB

---
- name: Rename host
ansible.builtin.hostname:
name: "{{ inventory_hostname }}"
- name: Change hosts
ansible.builtin.template:
src: hosts.j2
dest: /etc/hosts
backup: true
- name: Change MOTD file
ansible.builtin.template:
src: motd.j2
dest: /etc/motd
owner: root
group: root
mode: '0644'
backup: true
- name: Set timezone to Europe/Moscow
community.general.timezone:
name: Europe/Moscow
- name: Modify chronyd init.d args
ansible.builtin.lineinfile:
path: /etc/conf.d/chronyd
regexp: 'ARGS=""'
line: 'ARGS="-x"'
- name: Add Chrony to boot
ansible.builtin.service:
name: chronyd
runlevel: default
enabled: True
use: openrc
when: not ansible_check_mode
notify: Restart chronyd
- name: Create sshd.conf
ansible.builtin.template:
src: sshd_config.j2
dest: /etc/ssh/sshd_config
validate: /usr/sbin/sshd -t -f %s
backup: true
notify: Restart ssh server
- name: Add sshd to boot
ansible.builtin.service:
name: sshd
runlevel: default
enabled: True
use: openrc
when: not ansible_check_mode