-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.yml
More file actions
31 lines (27 loc) · 759 Bytes
/
Copy pathdeploy.yml
File metadata and controls
31 lines (27 loc) · 759 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
27
28
29
30
31
---
- name: deploy lamp stack
hosts: all
become: true
tasks:
- name: Copy script from Master node to slave with owner a
nd permissions
ansible.builtin.copy:
src: /home/vagrant/automate.sh
dest: /home/vagrant/automate.sh
owner: root
group: root
mode: '0755'
- name: Automate and deploy lamp stack
script: /home/vagrant/automate.sh
- name: Setup Cron to Check Server Up-Time Every 12AM
cron:
name: "Execute Cron Every 12AM"
minute: "0"
hour: "0"
job: "uptime >> ~/uptime.log"
- name: Check Server Uptime
command: uptime -p
register: uptime_out
- name: Print Out Server Up-Time in Play
debug:
var: uptime_out.stdout