forked from anilbidari/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapt.yaml
More file actions
26 lines (22 loc) · 650 Bytes
/
Copy pathapt.yaml
File metadata and controls
26 lines (22 loc) · 650 Bytes
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
---
- hosts: ip-172-31-12-28.us-west-1.compute.internal
become: true
tasks:
- name: Run the equivalent of "apt-get update" as a separate step
ansible.builtin.apt:
update_cache: yes
- name: Install apache httpd (state=present is optional)
ansible.builtin.apt:
name: apache2
state: present
- name: Start service apache2, if not started
ansible.builtin.service:
name: apache2
state: started
- name: Copy file with owner and permissions
ansible.builtin.copy:
src: index.html
dest: /var/www/html/index.html
owner: root
group: root
mode: '0644'