Skip to content

Commit 752650e

Browse files
committed
Syntax fixes for nodejs examples.
1 parent 299bd7d commit 752650e

File tree

3 files changed

+16
-28
lines changed

3 files changed

+16
-28
lines changed

nodejs-role/playbook.yml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,18 @@
77
pre_tasks:
88
# COMMON ###################################################################
99
- name: "Common: Import EPEL and Remi GPG keys."
10-
rpm_key: key={{ item }} state=present
10+
rpm_key: "key={{ item }} state=present"
1111
with_items:
12-
- "https://fedoraproject.org/static/0608B895.txt"
13-
- "http://rpms.famillecollet.com/RPM-GPG-KEY-remi"
12+
- "https://fedoraproject.org/static/0608B895.txt"
13+
- "http://rpms.famillecollet.com/RPM-GPG-KEY-remi"
1414

1515
- name: "Common: Install EPEL and Remi repos."
16-
command: rpm -Uvh --force {{ item.href }} creates={{ item.creates }}
16+
command: "rpm -Uvh --force {{ item.href }} creates={{ item.creates }}"
1717
with_items:
18-
- {
19-
href: "http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm",
20-
creates: "/etc/yum.repos.d/epel.repo"
21-
}
22-
- {
23-
href: "http://rpms.famillecollet.com/enterprise/remi-release-6.rpm",
24-
creates: "/etc/yum.repos.d/remi.repo"
25-
}
18+
- href: "http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm"
19+
creates: "/etc/yum.repos.d/epel.repo"
20+
- href: "http://rpms.famillecollet.com/enterprise/remi-release-6.rpm"
21+
creates: "/etc/yum.repos.d/remi.repo"
2622

2723
- name: "Common: Disable firewall (since this is a dev environment)."
2824
service: name=iptables state=stopped enabled=no
@@ -33,21 +29,19 @@
3329
tasks:
3430
# SAMPLE APP ###############################################################
3531
- name: "Node: Ensure Node.js app folder exists."
36-
file: path={{ node_apps_location }} state=directory
32+
file: "path={{ node_apps_location }} state=directory"
3733

38-
# For < 100 files, the copy module is adequate. For larger copies, consider
39-
# using the synchronize module instead.
4034
- name: "Node: Copy example Node.js app to server."
41-
copy: src=app dest={{ node_apps_location }}
35+
copy: "src=app dest={{ node_apps_location }}"
4236

4337
- name: "Node: Install app dependencies defined in package.json via npm."
44-
npm: path={{ node_apps_location }}/app
38+
npm: "path={{ node_apps_location }}/app"
4539

4640
- name: "Node: Check list of Node.js apps running."
4741
command: forever list
4842
register: forever_list
4943
changed_when: false
5044

5145
- name: "Node: Start example Node.js app."
52-
command: forever start {{ node_apps_location }}/app/app.js
46+
command: "forever start {{ node_apps_location }}/app/app.js"
5347
when: "forever_list.stdout.find('{{ node_apps_location}}/app/app.js') == -1"

nodejs/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This project aims to make spinning up a simple local Node.js test/development environment incredibly quick and easy, and to introduce new developers to the wonderful world of Node.js development on local virtual machines.
44

5-
It will install the following on a CentOS 6 linux VM:
5+
It will install the following on a CentOS 7 Linux VM:
66

77
- Node.js (latest version in EPEL repository)
88
- Express
@@ -16,13 +16,9 @@ It should take 5-10 minutes to build or rebuild the VM from scratch on a decent
1616

1717
1. Download and install [VirtualBox](https://www.virtualbox.org/wiki/Downloads).
1818
2. Download and install [Vagrant](http://www.vagrantup.com/downloads.html).
19-
3. [Mac/Linux only] Install Ansible:
20-
`sudo easy_install pip`
21-
`sudo pip install ansible`
19+
3. [Mac/Linux only] Install [Ansible](http://docs.ansible.com/intro_installation.html).
2220

23-
Note for Windows users: *This guide assumes you're on a Mac or Linux host. Windows support may be added when I get a little more time; the main difference is Ansible needs to be bootstrapped from within the VM after it's created. See [JJG-Ansible-Windows](https://github.com/geerlingguy/JJG-Ansible-Windows) for more information.*
24-
25-
Note for Mac users: *On Mac OS X, you may also need to install XCode (free on the App Store) to install some required dependencies. If you're having trouble installing Ansible, check out the [Installing Ansible docs](http://docs.ansible.com/intro_installation.html).*
21+
Note for Windows users: *This guide assumes you're on a Mac or Linux host. Windows hosts are unsupported at this time.*
2622

2723
### 2 - Build the Virtual Machine
2824

nodejs/provisioning/playbook.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414
- name: Install Remi repo.
1515
command: "rpm -Uvh --force {{ item.href }} creates={{ item.creates }}"
1616
with_items:
17-
- {
18-
href: "http://rpms.famillecollet.com/enterprise/remi-release-6.rpm",
17+
- href: "http://rpms.famillecollet.com/enterprise/remi-release-6.rpm"
1918
creates: "/etc/yum.repos.d/remi.repo"
20-
}
2119

2220
- name: Install EPEL repo.
2321
yum: name=epel-release state=present

0 commit comments

Comments
 (0)