for the scope of this type of demo network, this is much simpler than installing and managing dns.
26 lines
624 B
YAML
Executable File
26 lines
624 B
YAML
Executable File
---
|
|
- name: Upgrade all packages o the latest version
|
|
become: true
|
|
apt:
|
|
upgrade: yes
|
|
update_cache: yes
|
|
tags: apt_upgrade
|
|
- name: Create directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: pi
|
|
group: pi
|
|
with_items:
|
|
- /home/pi/Documents/ftp
|
|
- /home/pi/Documents/smb
|
|
- /home/pi/scripts
|
|
tags: create_dirs
|
|
- name: update hosts file
|
|
become: true
|
|
blockinfile:
|
|
dest: /etc/hosts
|
|
content: "{{ lookup('template', '{{ role_path }}/templates/hosts.j2') }}"
|
|
state: present
|
|
tags: update_hosts
|