Files
dsfin-ansible/roles/common/tasks/main.yaml
Pi 23915d0549 -change hosts file - will maintain hosts file on multipe machines.
for the scope of this type of demo network, this is much simpler
than installing and managing dns.
2019-03-14 12:55:33 -04:00

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