ansible-nas/roles/ansible-nas-general/tasks/main.yml
David Stephens 8d1cd19b80
Fixes #585
2022-10-01 21:00:27 +01:00

47 lines
977 B
YAML

---
- name: Set login banner
copy:
src: motd.txt
dest: /etc/motd
- name: Update apt-cache
apt:
update_cache: yes
cache_valid_time: 3600
register: result
until: result is succeeded
- name: Upgrade all packages # noqa package-latest
apt:
upgrade: yes
state: latest
when: keep_packages_updated
tags:
- skip_ansible_lint
- name: Install some packages
apt:
name: "{{ ansible_nas_extra_packages }}"
state: present
register: result
until: result is succeeded
# - name: Configure smartmontools
- name: "Set hostname to {{ ansible_nas_hostname }}"
hostname:
name: "{{ ansible_nas_hostname }}"
- name: "Set timezone to {{ ansible_nas_timezone }}"
timezone:
name: "{{ ansible_nas_timezone }}"
- name: "Permission share directories"
file:
path: "{{ item.path }}"
state: directory
owner: ansible-nas
group: ansible-nas
mode: "u=rwX,g=rwX,o=rX"
recurse: false
loop: "{{ samba_shares }}"