-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
40 lines (36 loc) · 1009 Bytes
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/systemd_module.html#examples
- hosts: all
become: true
tasks:
- name: Update Debian repo cache
ansible.builtin.apt:
update_cache: true
# when: ansible_os_family == "Debian"
# changed_when: false
tags: [ 'update_cache' , 'update_repo' ]
- name: Install Docker
apt:
name: docker.io
state: present
tags: ["docker"]
- name: Start docker service and ensure is enabled
systemd:
name: docker
state: started
enabled: true
tags: ["docker"]
- name: Install NginX
apt:
name:
- nginx
tags: [ 'setup' ]
- name: Copy index page
copy:
src: index.html
dest: /var/www/html/index.html
owner: www-data
group: www-data
mode: '0644'
tags: [ 'update', 'sync' ]