-
Notifications
You must be signed in to change notification settings - Fork 1
/
RHEL7x_Apply-Chrysus-Updates-playbook.yml
53 lines (40 loc) · 1.67 KB
/
RHEL7x_Apply-Chrysus-Updates-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
41
42
43
44
45
46
47
48
49
50
51
52
53
---
################################################################################
# description: Apply updates to Chrysus on RHEL7x
# usage: ansible-playbook RHEL7x_Apply-Chrysus-Updates-playbook.yml --extra-vars 'HostOrGroup=YourServerOrGroupNameGoesHere'
# author: Ernest G. Wilson II <ErnestGWilsonII@gmail.com> (https://github.com/ernestgwilsonii)
# license: MIT
################################################################################
# Ansible Playbook options
# REF: http://docs.ansible.com/ansible/playbooks.html
#####################################################
- name: Apply updates to Chrysus on RHEL7x
hosts: "{{ HostOrGroup|default ('FATAL ERROR --> HostOrGroup NOT SET! You must specify either a Host or a Group name!') }}"
serial: "100%"
gather_facts: False
tasks:
# raw - Executes a low-down and dirty SSH command
# REF: http://docs.ansible.com/ansible/raw_module.html
######################################################
- name: Update Chrysus Engine
shell: cd /opt/chrysus; /usr/bin/npm install chrysus
# Set attributes of files
# REF: http://docs.ansible.com/ansible/file_module.html
#######################################################
- name: Set directory permisions on /opt/chrysus
file:
path=/opt/chrysus
state=directory
owner=chrysus
group=wheel
recurse=yes
# Restart the service
# REF: http://docs.ansible.com/ansible/service_module.html
##########################################################
- name: Restart the chrysus service
service:
name=chrysus.service
enabled=yes
state=restarted
# Note: Verify chrysus via SSH command line:
# systemctl status chrysus