mirror of
https://github.com/davestephens/ansible-nas
synced 2024-11-15 16:28:03 +00:00
2166b720b2
Add general task to enable universe repo
49 lines
No EOL
1,021 B
YAML
49 lines
No EOL
1,021 B
YAML
---
|
|
- name: Set login banner
|
|
template:
|
|
src: ansible-nas/motd.txt
|
|
dest: /etc/motd
|
|
|
|
- name: Enable Universe repository
|
|
raw: apt-add-repository universe
|
|
|
|
- name: Update apt-cache
|
|
apt:
|
|
update_cache: yes
|
|
cache_valid_time: 3600
|
|
register: result
|
|
until: result is succeeded
|
|
|
|
- name: Upgrade all packages
|
|
apt:
|
|
upgrade: true
|
|
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 }}"
|
|
owner: ansible-nas
|
|
group: ansible-nas
|
|
mode: "u=rwX,g=rwX,o=rX"
|
|
recurse: false
|
|
loop: "{{ samba_shares }}" |