|
7 | 7 | pre_tasks: |
8 | 8 | # COMMON ################################################################### |
9 | 9 | - name: "Common: Import EPEL and Remi GPG keys." |
10 | | - rpm_key: key={{ item }} state=present |
| 10 | + rpm_key: "key={{ item }} state=present" |
11 | 11 | 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" |
14 | 14 |
|
15 | 15 | - 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 }}" |
17 | 17 | 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" |
26 | 22 |
|
27 | 23 | - name: "Common: Disable firewall (since this is a dev environment)." |
28 | 24 | service: name=iptables state=stopped enabled=no |
|
33 | 29 | tasks: |
34 | 30 | # SAMPLE APP ############################################################### |
35 | 31 | - name: "Node: Ensure Node.js app folder exists." |
36 | | - file: path={{ node_apps_location }} state=directory |
| 32 | + file: "path={{ node_apps_location }} state=directory" |
37 | 33 |
|
38 | | - # For < 100 files, the copy module is adequate. For larger copies, consider |
39 | | - # using the synchronize module instead. |
40 | 34 | - 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 }}" |
42 | 36 |
|
43 | 37 | - 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" |
45 | 39 |
|
46 | 40 | - name: "Node: Check list of Node.js apps running." |
47 | 41 | command: forever list |
48 | 42 | register: forever_list |
49 | 43 | changed_when: false |
50 | 44 |
|
51 | 45 | - 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" |
53 | 47 | when: "forever_list.stdout.find('{{ node_apps_location}}/app/app.js') == -1" |
0 commit comments