taperole 1.2.8 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.hound.yml +7 -0
  3. data/CHANGELOG.md +12 -0
  4. data/README.md +7 -16
  5. data/config/style_guides/ruby.yml +238 -0
  6. data/lib/tape/ansible_runner.rb +41 -33
  7. data/lib/tape/installer.rb +56 -28
  8. data/lib/tape.rb +8 -0
  9. data/requirements.yml +5 -2
  10. data/roles/backend_install_essentials/meta/main.yml +1 -1
  11. data/roles/database_load/tasks/db_reset.yml +3 -3
  12. data/roles/deployer_user/tasks/keys.yml +3 -2
  13. data/roles/frontend_deploy/tasks/main.yml +5 -1
  14. data/roles/frontend_install_essentials/meta/main.yml +3 -0
  15. data/roles/general/meta/main.yml +2 -0
  16. data/roles/general/tasks/basic_packages.yml +3 -0
  17. data/roles/general/tasks/main.yml +11 -1
  18. data/roles/nginx/tasks/main.yml +6 -2
  19. data/taperole.gemspec +1 -1
  20. data/templates/base/hosts.example +1 -1
  21. data/templates/base/tape_vars.example.yml +0 -3
  22. data/templates/static_html/tape_vars.example.yml +0 -3
  23. data/vars/defaults.yml +5 -0
  24. data/vendor/ANXS.postgresql/.travis.yml +11 -6
  25. data/vendor/ANXS.postgresql/README.md +5 -1
  26. data/vendor/ANXS.postgresql/Vagrantfile +1 -1
  27. data/vendor/ANXS.postgresql/defaults/main.yml +35 -1
  28. data/vendor/ANXS.postgresql/meta/.galaxy_install_info +1 -1
  29. data/vendor/ANXS.postgresql/tasks/configure.yml +34 -3
  30. data/vendor/ANXS.postgresql/tasks/databases.yml +13 -0
  31. data/vendor/ANXS.postgresql/tasks/install.yml +22 -0
  32. data/vendor/ANXS.postgresql/tasks/users_privileges.yml +4 -4
  33. data/vendor/ANXS.postgresql/templates/etc_apt_preferences.d_apt_postgresql_org_pub_repos_apt.pref.j2 +5 -0
  34. data/vendor/ANXS.postgresql/templates/postgresql.conf-9.3.j2 +596 -0
  35. data/vendor/ANXS.postgresql/templates/postgresql.conf-9.4.j2 +614 -0
  36. data/vendor/ANXS.postgresql/vagrant-inventory +1 -1
  37. data/vendor/bennojoy.memcached/meta/.galaxy_install_info +1 -1
  38. data/vendor/jnv.mosh/LICENSE +24 -0
  39. data/vendor/jnv.mosh/README.md +56 -0
  40. data/vendor/jnv.mosh/meta/.galaxy_install_info +1 -0
  41. data/vendor/jnv.mosh/meta/main.yml +96 -0
  42. data/vendor/jnv.mosh/tasks/main.yml +20 -0
  43. data/vendor/jnv.mosh/vars/main.yml +4 -0
  44. data/vendor/jnv.unattended-upgrades/meta/.galaxy_install_info +1 -1
  45. data/vendor/lxhunter.apt/.gitignore +1 -0
  46. data/vendor/lxhunter.apt/.kitchen.yml +67 -0
  47. data/vendor/lxhunter.apt/README.md +33 -25
  48. data/vendor/lxhunter.apt/defaults/main.yml +1 -5
  49. data/vendor/lxhunter.apt/meta/.galaxy_install_info +1 -1
  50. data/vendor/lxhunter.apt/tasks/main.yml +23 -23
  51. data/vendor/lxhunter.apt/test/integration/default/bats/simple.bats +35 -0
  52. data/vendor/lxhunter.apt/test/integration/default/default.yml +16 -0
  53. data/vendor/tersmitten.htop/.gitignore +29 -0
  54. data/vendor/tersmitten.htop/.travis.yml +75 -0
  55. data/vendor/tersmitten.htop/LICENSE.txt +19 -0
  56. data/vendor/tersmitten.htop/README.md +45 -0
  57. data/vendor/tersmitten.htop/Vagrantfile +71 -0
  58. data/vendor/tersmitten.htop/defaults/main.yml +8 -0
  59. data/vendor/tersmitten.htop/files/etc/skel/.config/htop/htoprc +23 -0
  60. data/vendor/tersmitten.htop/handlers/main.yml +2 -0
  61. data/vendor/tersmitten.htop/meta/.galaxy_install_info +1 -0
  62. data/vendor/tersmitten.htop/meta/main.yml +18 -0
  63. data/vendor/tersmitten.htop/tasks/main.yml +27 -0
  64. data/vendor/tersmitten.htop/templates/empty +0 -0
  65. data/vendor/tersmitten.htop/tests/inventory +1 -0
  66. data/vendor/tersmitten.htop/tests/test.yml +6 -0
  67. data/vendor/tersmitten.htop/tests/vagrant.yml +17 -0
  68. data/vendor/tersmitten.htop/vars/main.yml +2 -0
  69. data/vendor/williamyeh.nodejs/.gitignore +1 -0
  70. data/vendor/williamyeh.nodejs/LICENSE +22 -0
  71. data/vendor/williamyeh.nodejs/README.md +107 -0
  72. data/vendor/williamyeh.nodejs/Vagrantfile +33 -0
  73. data/vendor/williamyeh.nodejs/circle.yml +32 -0
  74. data/vendor/williamyeh.nodejs/defaults/main.yml +17 -0
  75. data/vendor/williamyeh.nodejs/files/nodesource.gpg.key +52 -0
  76. data/vendor/williamyeh.nodejs/meta/.galaxy_install_info +1 -0
  77. data/vendor/williamyeh.nodejs/meta/main.yml +27 -0
  78. data/vendor/williamyeh.nodejs/tasks/main.yml +19 -0
  79. data/vendor/williamyeh.nodejs/tasks/set-role-variables.yml +15 -0
  80. data/vendor/williamyeh.nodejs/tasks/use-apt.yml +88 -0
  81. data/vendor/williamyeh.nodejs/tasks/use-yum.yml +34 -0
  82. data/vendor/williamyeh.nodejs/test/Dockerfile-centos6 +29 -0
  83. data/vendor/williamyeh.nodejs/test/Dockerfile-centos7 +29 -0
  84. data/vendor/williamyeh.nodejs/test/Dockerfile-debian7 +29 -0
  85. data/vendor/williamyeh.nodejs/test/Dockerfile-debian8 +29 -0
  86. data/vendor/williamyeh.nodejs/test/Dockerfile-ubuntu12.04 +29 -0
  87. data/vendor/williamyeh.nodejs/test/Dockerfile-ubuntu14.04 +29 -0
  88. data/vendor/williamyeh.nodejs/test.yml +12 -0
  89. data/vendor/zzet.rbenv/.travis.yml +5 -2
  90. data/vendor/zzet.rbenv/README.md +1 -1
  91. data/vendor/zzet.rbenv/defaults/main.yml +3 -3
  92. data/vendor/zzet.rbenv/meta/.galaxy_install_info +1 -1
  93. data/vendor/zzet.rbenv/tasks/apt_build_depends.yml +7 -0
  94. data/vendor/zzet.rbenv/tasks/homebrew_build_depends.yml +4 -2
  95. data/vendor/zzet.rbenv/tasks/main.yml +5 -2
  96. metadata +53 -7
  97. data/lib/tape/vagrant_provisioner.rb +0 -42
  98. data/vendor/ANXS.postgresql/templates/postgresql.conf.j2 +0 -446
  99. data/vendor/lxhunter.apt/.travis.yml +0 -12
  100. data/vendor/lxhunter.apt/Vagrantfile +0 -16
  101. data/vendor/lxhunter.apt/templates/apt_10general.j2 +0 -4
@@ -0,0 +1,71 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby ts=2 sw=2 tw=0 et :
3
+
4
+ role = File.basename(File.expand_path(File.dirname(__FILE__)))
5
+
6
+ File.open(File.dirname(__FILE__) + '/ansible.cfg', 'w') { |f| f.write("[defaults]\nroles_path = ../") }
7
+
8
+ boxes = [
9
+ {
10
+ :name => "ubuntu-1004",
11
+ :box => "opscode-ubuntu-10.04",
12
+ :url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-10.04_chef-provisionerless.box",
13
+ :ip => '10.0.0.10',
14
+ :cpu => "50",
15
+ :ram => "256"
16
+ },
17
+ {
18
+ :name => "ubuntu-1204",
19
+ :box => "opscode-ubuntu-12.04",
20
+ :url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box",
21
+ :ip => '10.0.0.11',
22
+ :cpu => "50",
23
+ :ram => "256"
24
+ },
25
+ {
26
+ :name => "ubuntu-1404",
27
+ :box => "opscode-ubuntu-14.04",
28
+ :url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box",
29
+ :ip => '10.0.0.12',
30
+ :cpu => "50",
31
+ :ram => "256"
32
+ },
33
+ {
34
+ :name => "debian-6010",
35
+ :box => "opscode-debian-6.0.10",
36
+ :url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-6.0.10_chef-provisionerless.box",
37
+ :ip => '10.0.0.13',
38
+ :cpu => "50",
39
+ :ram => "256"
40
+ },
41
+ {
42
+ :name => "debian-78",
43
+ :box => "opscode-debian-7.8",
44
+ :url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.8_chef-provisionerless.box",
45
+ :ip => '10.0.0.14',
46
+ :cpu => "50",
47
+ :ram => "256"
48
+ },
49
+ ]
50
+
51
+ Vagrant.configure("2") do |config|
52
+ boxes.each do |box|
53
+ config.vm.define box[:name] do |vms|
54
+ vms.vm.box = box[:box]
55
+ vms.vm.box_url = box[:url]
56
+ vms.vm.hostname = "ansible-#{role}-#{box[:name]}"
57
+
58
+ vms.vm.provider "virtualbox" do |v|
59
+ v.customize ["modifyvm", :id, "--cpuexecutioncap", box[:cpu]]
60
+ v.customize ["modifyvm", :id, "--memory", box[:ram]]
61
+ end
62
+
63
+ vms.vm.network :private_network, ip: box[:ip]
64
+
65
+ vms.vm.provision :ansible do |ansible|
66
+ ansible.playbook = "tests/vagrant.yml"
67
+ ansible.verbose = "vv"
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,8 @@
1
+ ---
2
+ # defaults file for htop
3
+ htop_htoprc_destinations:
4
+ skell:
5
+ dest: /etc/skel/.config/htop
6
+ current:
7
+ dest: "{{ ansible_env.HOME }}/.config/htop"
8
+ htop_replace_htoprc: true
@@ -0,0 +1,23 @@
1
+ # Beware! This file is rewritten by htop when settings are changed in the interface.
2
+ # The parser is also very primitive, and not human-friendly.
3
+ fields=0 48 17 18 38 39 40 2 46 47 49 1
4
+ sort_key=46
5
+ sort_direction=1
6
+ hide_threads=0
7
+ hide_kernel_threads=1
8
+ hide_userland_threads=0
9
+ shadow_other_users=0
10
+ show_thread_names=0
11
+ highlight_base_name=1
12
+ highlight_megabytes=1
13
+ highlight_threads=1
14
+ tree_view=0
15
+ header_margin=1
16
+ detailed_cpu_time=0
17
+ cpu_count_from_zero=0
18
+ color_scheme=0
19
+ delay=15
20
+ left_meters=LeftCPUs2 Memory Swap
21
+ left_meter_modes=1 1 1
22
+ right_meters=RightCPUs2 Tasks LoadAverage Uptime Clock Hostname
23
+ right_meter_modes=1 2 2 2 2 2
@@ -0,0 +1,2 @@
1
+ ---
2
+ # handlers file for htop
@@ -0,0 +1 @@
1
+ {install_date: 'Tue Nov 17 14:57:00 2015', version: v2.0.1}
@@ -0,0 +1,18 @@
1
+ ---
2
+ # meta file for htop
3
+ galaxy_info:
4
+ author: Mischa ter Smitten
5
+ company: Oefenweb.nl B.V.
6
+ description: Set up htop in Debian-like systems
7
+ license: MIT
8
+ min_ansible_version: 1.5
9
+ platforms:
10
+ - name: Ubuntu
11
+ versions:
12
+ - all
13
+ - name: Debian
14
+ versions:
15
+ - all
16
+ categories:
17
+ - system
18
+ dependencies: []
@@ -0,0 +1,27 @@
1
+ ---
2
+ # tasks file for htop
3
+ - name: install
4
+ apt:
5
+ name: htop
6
+ state: latest
7
+ update_cache: true
8
+ cache_valid_time: 3600
9
+ tags: [configuration, htop, htop-install]
10
+
11
+ - name: create configuration directory
12
+ file:
13
+ path: "{{ item.value.dest }}"
14
+ state: directory
15
+ with_dict: htop_htoprc_destinations
16
+ tags: [configuration, htop, htop-configuration]
17
+
18
+ - name: create configuration file
19
+ copy:
20
+ src: etc/skel/.config/htop/htoprc
21
+ dest: "{{ item.value.dest }}/htoprc"
22
+ owner: "{{ item.value.owner | default('root') }}"
23
+ group: "{{ item.value.group | default(item.value.owner) | default('root') }}"
24
+ mode: "{{ item.value.mode | default('0644') }}"
25
+ force: "{{ 'yes' if htop_replace_htoprc else 'no' }}"
26
+ with_dict: htop_htoprc_destinations
27
+ tags: [configuration, htop, htop-configuration]
File without changes
@@ -0,0 +1 @@
1
+ localhost
@@ -0,0 +1,6 @@
1
+ ---
2
+ # test file for htop
3
+ - hosts: localhost
4
+ remote_user: root
5
+ roles:
6
+ - ansible-htop
@@ -0,0 +1,17 @@
1
+ ---
2
+ # test file for htop
3
+ - hosts: all
4
+ remote_user: vagrant
5
+ sudo: true
6
+ roles:
7
+ - htop
8
+ vars:
9
+ htop_htoprc_destinations:
10
+ skell:
11
+ dest: /etc/skel/.config/htop
12
+ current:
13
+ dest: "{{ ansible_env.HOME }}/.config/htop"
14
+ vagrant:
15
+ dest: /home/vagrant/.config/htop
16
+ owner: vagrant
17
+ group: vagrant
@@ -0,0 +1,2 @@
1
+ ---
2
+ # vars file for htop
@@ -0,0 +1 @@
1
+ .vagrant
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 William Yeh <william.pjyeh@gmail.com>
4
+
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -0,0 +1,107 @@
1
+
2
+ williamyeh.nodejs for Ansible Galaxy
3
+ ============
4
+
5
+ [![Circle CI](https://circleci.com/gh/William-Yeh/ansible-nodejs.svg?style=shield)](https://circleci.com/gh/William-Yeh/ansible-nodejs)
6
+
7
+
8
+ ## Summary
9
+
10
+ Role name in Ansible Galaxy: **[williamyeh.nodejs](https://galaxy.ansible.com/list#/roles/3669)**
11
+
12
+ This Ansible role has the following features for [Node.js](http://nodejs.org/):
13
+
14
+ - Install specific version of Node.js (including [io.js](https://iojs.org/)).
15
+
16
+
17
+
18
+
19
+ ## Role Variables
20
+
21
+ ### Mandatory variables
22
+
23
+ None.
24
+
25
+
26
+
27
+ ### Optional variables
28
+
29
+ Pick one version to install:
30
+
31
+ ```yaml
32
+ # Node.js version; e.g., "4.0", "0.12", "0.12.7"
33
+ nodejs_version
34
+
35
+
36
+ # io.js version; e.g., "3.3"
37
+ iojs_version
38
+ ```
39
+
40
+ If neither `nodejs_version` nor `iojs_version` is defined, `nodejs_version` is defined automatically by `tasks/set-role-variables.yml` as:
41
+
42
+ - `nodejs_default_in_apt` for Debian/Ubuntu.
43
+ - `nodejs_default_in_yum` for CentOS.
44
+
45
+
46
+ User-configurable defaults:
47
+
48
+ ```yaml
49
+ # install tools for compiling native addons from npm?
50
+ nodejs_compile: True
51
+ ```
52
+
53
+
54
+ ## Usage
55
+
56
+
57
+ ### Step 1: add role
58
+
59
+ Add role name `williamyeh.nodejs` to your playbook file.
60
+
61
+
62
+ ### Step 2: add variables
63
+
64
+ Set vars in your playbook file.
65
+
66
+ Simple example:
67
+
68
+ ```yaml
69
+ ---
70
+ # file: simple-playbook.yml
71
+
72
+ - hosts: all
73
+ sudo: True
74
+
75
+ roles:
76
+ - williamyeh.nodejs
77
+
78
+ vars:
79
+ nodejs_version: 4.0
80
+ ```
81
+
82
+
83
+ ## Dependencies
84
+
85
+ None.
86
+
87
+
88
+ ## License
89
+
90
+ Licensed under the MIT License. See the [LICENSE file](LICENSE) for details.
91
+
92
+
93
+ ## History
94
+
95
+ - 1.0 : From now on, the role installs Node.js from [NodeSource](https://github.com/nodesource/distributions) binary distributions.
96
+
97
+
98
+
99
+ Older versions are based on NVM:
100
+
101
+ - Rewritten from my pre-Galaxy version [server-config-template](https://github.com/William-Yeh/server-config-template) and Galaxy version [ansible-nvm-nodejs](https://github.com/William-Yeh/ansible-nvm-nodejs).
102
+
103
+ - During refactoring, some roles on Ansible Galaxy also inspired me:
104
+
105
+ - [leonidas.nvm](https://galaxy.ansible.com/list#/roles/694) forks, especially [ahmednuaman.nvm-ahmed](https://galaxy.ansible.com/list#/roles/2298) and then [g-div/ansible-nvm](https://github.com/g-div/ansible-nvm)
106
+
107
+
@@ -0,0 +1,33 @@
1
+ Vagrant.configure(2) do |config|
2
+
3
+ # main & default: normal OS series...
4
+ config.vm.define "main", primary: true do |node|
5
+ node.vm.box = "ubuntu/trusty64"
6
+ #node.vm.box = "ubuntu/precise64"
7
+ #node.vm.box = "debian/jessie64"
8
+ #node.vm.box = "debian/wheezy64"
9
+ #node.vm.box = "chef/centos-7.0"
10
+ #node.vm.box = "chef/centos-6.6"
11
+
12
+ node.vm.provision "ansible" do |ansible|
13
+ ansible.playbook = "test.yml"
14
+ end
15
+ end
16
+
17
+
18
+ # docker: for auto build & testing (e.g., Travis CI)
19
+ config.vm.define "docker" do |node|
20
+ node.vm.box = "williamyeh/ubuntu-trusty64-docker"
21
+
22
+ node.vm.provision "shell", inline: <<-SHELL
23
+ cd /vagrant
24
+ docker build -f test/Dockerfile-ubuntu14.04 -t nodejs_trusty .
25
+ docker build -f test/Dockerfile-ubuntu12.04 -t nodejs_precise .
26
+ docker build -f test/Dockerfile-debian8 -t nodejs_jessie .
27
+ docker build -f test/Dockerfile-debian7 -t nodejs_wheezy .
28
+ docker build -f test/Dockerfile-centos7 -t nodejs_centos7 .
29
+ docker build -f test/Dockerfile-centos6 -t nodejs_centos6 .
30
+ SHELL
31
+ end
32
+
33
+ end
@@ -0,0 +1,32 @@
1
+ machine:
2
+ services:
3
+ - docker
4
+
5
+ dependencies:
6
+ override:
7
+ - docker info
8
+ - docker version
9
+
10
+ - docker build -f test/Dockerfile-ubuntu14.04 -t nodejs_trusty .
11
+ - docker build -f test/Dockerfile-ubuntu12.04 -t nodejs_precise .
12
+ - docker build -f test/Dockerfile-debian8 -t nodejs_jessie .
13
+ - docker build -f test/Dockerfile-debian7 -t nodejs_wheezy .
14
+ - docker build -f test/Dockerfile-centos7 -t nodejs_centos7 .
15
+ - docker build -f test/Dockerfile-centos6 -t nodejs_centos6 .
16
+
17
+ test:
18
+ override:
19
+ - docker run -i nodejs_trusty > result-ubuntu14.04
20
+ - docker run -i nodejs_precise > result-ubuntu12.04
21
+ - docker run -i nodejs_jessie > result-debian8
22
+ - docker run -i nodejs_wheezy > result-debian7
23
+ - docker run -i nodejs_centos7 > result-centos7
24
+ - docker run -i nodejs_centos6 > result-centos6
25
+
26
+ - echo "==> Validating the test results..."
27
+ - sh -c "[ -s result-ubuntu14.04 ]"
28
+ - sh -c "[ -s result-ubuntu12.04 ]"
29
+ - sh -c "[ -s result-debian8 ]"
30
+ - sh -c "[ -s result-debian7 ]"
31
+ - sh -c "[ -s result-centos7 ]"
32
+ - sh -c "[ -s result-centos6 ]"
@@ -0,0 +1,17 @@
1
+ ---
2
+
3
+ #
4
+ # variables needed to be defined in user's playbook
5
+ #
6
+
7
+
8
+
9
+ #
10
+ # user-configurable defaults
11
+ #
12
+
13
+ nodejs_compile: True # install tools for compiling native addons from npm
14
+
15
+
16
+ nodejs_default_in_apt: "0.12"
17
+ nodejs_default_in_yum: "0.10"
@@ -0,0 +1,52 @@
1
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
2
+ Version: GnuPG v1
3
+ Comment: GPGTools - https://gpgtools.org
4
+
5
+ mQINBFObJLYBEADkFW8HMjsoYRJQ4nCYC/6Eh0yLWHWfCh+/9ZSIj4w/pOe2V6V+
6
+ W6DHY3kK3a+2bxrax9EqKe7uxkSKf95gfns+I9+R+RJfRpb1qvljURr54y35IZgs
7
+ fMG22Np+TmM2RLgdFCZa18h0+RbH9i0b+ZrB9XPZmLb/h9ou7SowGqQ3wwOtT3Vy
8
+ qmif0A2GCcjFTqWW6TXaY8eZJ9BCEqW3k/0Cjw7K/mSy/utxYiUIvZNKgaG/P8U7
9
+ 89QyvxeRxAf93YFAVzMXhoKx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CRAWVaCraFdigIPQEACcYh8rR19wMZZ/hgYv5so6Y1HcJNARuzmffQKozS/rxqec
41
+ 0xM3wceL1AIMuGhlXFeGd0wRv/RVzeZjnTGwhN1DnCDy1I66hUTgehONsfVanuP1
42
+ PZKoL38EAxsMzdYgkYH6T9a4wJH/IPt+uuFTFFy3o8TKMvKaJk98+Jsp2X/QuNxh
43
+ qpcIGaVbtQ1bn7m+k5Qe/fz+bFuUeXPivafLLlGc6KbdgMvSW9EVMO7yBy/2JE15
44
+ ZJgl7lXKLQ31VQPAHT3an5IV2C/ie12eEqZWlnCiHV/wT+zhOkSpWdrheWfBT+ac
45
+ hR4jDH80AS3F8jo3byQATJb3RoCYUCVc3u1ouhNZa5yLgYZ/iZkpk5gKjxHPudFb
46
+ DdWjbGflN9k17VCf4Z9yAb9QMqHzHwIGXrb7ryFcuROMCLLVUp07PrTrRxnO9A/4
47
+ xxECi0l/BzNxeU1gK88hEaNjIfviPR/h6Gq6KOcNKZ8rVFdwFpjbvwHMQBWhrqfu
48
+ G3KaePvbnObKHXpfIKoAM7X2qfO+IFnLGTPyhFTcrl6vZBTMZTfZiC1XDQLuGUnd
49
+ sckuXINIU3DFWzZGr0QrqkuE/jyr7FXeUJj9B7cLo+s/TXo+RaVfi3kOc9BoxIvy
50
+ /qiNGs/TKy2/Ujqp/affmIMoMXSozKmga81JSwkADO1JMgUy6dApXz9kP4EE3g==
51
+ =CLGF
52
+ -----END PGP PUBLIC KEY BLOCK-----
@@ -0,0 +1 @@
1
+ {install_date: 'Mon Nov 16 16:35:28 2015', version: master}
@@ -0,0 +1,27 @@
1
+ ---
2
+ # nodejs/meta/main.yml
3
+
4
+ galaxy_info:
5
+ author: williamyeh
6
+ description: Install and configure Node.js
7
+ license: MIT
8
+ min_ansible_version: 1.4
9
+
10
+ platforms:
11
+ - name: Ubuntu
12
+ versions:
13
+ - precise
14
+ - trusty
15
+ - name: Debian
16
+ versions:
17
+ - wheezy
18
+ - jessie
19
+ - name: EL
20
+ versions:
21
+ - 6
22
+ - 7
23
+
24
+ categories:
25
+ - development
26
+
27
+ dependencies: []
@@ -0,0 +1,19 @@
1
+ ---
2
+ # file: tasks/main.yml
3
+ # Top-level installer for Node.js.
4
+ #
5
+ # @see https://github.com/nodesource/distributions
6
+ #
7
+
8
+
9
+ - name: set role variables, if necessary
10
+ include: set-role-variables.yml
11
+
12
+
13
+ - name: delegate to APT system for installation
14
+ include: use-apt.yml
15
+ when: ansible_pkg_mgr == "apt"
16
+
17
+ - name: delegate to YUM system for installation
18
+ include: use-yum.yml
19
+ when: ansible_pkg_mgr == "yum"
@@ -0,0 +1,15 @@
1
+ ---
2
+ # file: tasks/set-role-variables.yml
3
+ # set necessary role variables.
4
+ #
5
+
6
+ - name: set nodejs_version, if neither version variables are defined
7
+ set_fact:
8
+ nodejs_version: "{{ nodejs_default_in_apt }}"
9
+ when: nodejs_version is not defined and iojs_version is not defined and ansible_pkg_mgr == "apt"
10
+
11
+
12
+ - name: set nodejs_version, if neither version variables are defined
13
+ set_fact:
14
+ nodejs_version: "{{ nodejs_default_in_yum }}"
15
+ when: nodejs_version is not defined and iojs_version is not defined and ansible_pkg_mgr == "yum"
@@ -0,0 +1,88 @@
1
+ ---
2
+ # file: tasks/use-apt.yml
3
+ #
4
+ # Configure Node.js from APT repository.
5
+ #
6
+ # @see https://github.com/nodesource/distributions
7
+ #
8
+
9
+ - name: install add-apt-repository and https binaries for Ansible to work
10
+ apt: name={{ item }} state=present update_cache=yes
11
+ with_items:
12
+ - python-software-properties
13
+ - apt-transport-https
14
+
15
+ - name: install tools for compiling native addons from npm
16
+ apt: name={{ item }} state=present
17
+ with_items:
18
+ - build-essential
19
+ when: nodejs_compile
20
+
21
+
22
+
23
+ - name: add NodeSource key
24
+ apt_key: data="{{ lookup('file', 'nodesource.gpg.key') }}" state=present
25
+
26
+
27
+ - name: add NodeSource repository for Node.js 4.0 (deb)
28
+ apt_repository: repo='deb https://deb.nodesource.com/node_4.x {{ ansible_distribution_release|lower }} main' state=present
29
+ when: (nodejs_version is defined) and nodejs_version|version_compare('4.0', '>=')
30
+
31
+ - name: add NodeSource repository for Node.js 0.12 (deb)
32
+ apt_repository: repo='deb https://deb.nodesource.com/node_0.12 {{ ansible_distribution_release|lower }} main' state=present
33
+ when: nodejs_version is defined
34
+
35
+ - name: add NodeSource repository for Node.js 0.10 (deb)
36
+ apt_repository: repo='deb https://deb.nodesource.com/node_0.10 {{ ansible_distribution_release|lower }} main' state=present
37
+ when: nodejs_version is defined
38
+
39
+ - name: add NodeSource repository for Node.js 4.0 (deb-src)
40
+ apt_repository: repo='deb-src https://deb.nodesource.com/node_4.x {{ ansible_distribution_release|lower }} main' state=present
41
+ when: (nodejs_version is defined) and nodejs_version|version_compare('4.0', '>=')
42
+
43
+ - name: add NodeSource repository for Node.js 0.12 (deb-src)
44
+ apt_repository: repo='deb-src https://deb.nodesource.com/node_0.12 {{ ansible_distribution_release|lower }} main' state=present
45
+ when: nodejs_version is defined
46
+
47
+ - name: add NodeSource repository for Node.js 0.10 (deb-src)
48
+ apt_repository: repo='deb-src https://deb.nodesource.com/node_0.10 {{ ansible_distribution_release|lower }} main' state=present
49
+ when: nodejs_version is defined
50
+
51
+
52
+
53
+ - name: add NodeSource repository for io.js 3.x (deb)
54
+ apt_repository: repo='deb https://deb.nodesource.com/iojs_3.x {{ ansible_distribution_release|lower }} main' state=present
55
+ when: iojs_version is defined
56
+
57
+ - name: add NodeSource repository for io.js 2.x (deb)
58
+ apt_repository: repo='deb https://deb.nodesource.com/iojs_2.x {{ ansible_distribution_release|lower }} main' state=present
59
+ when: iojs_version is defined
60
+
61
+ - name: add NodeSource repository for io.js 1.x (deb)
62
+ apt_repository: repo='deb https://deb.nodesource.com/iojs_1.x {{ ansible_distribution_release|lower }} main' state=present
63
+ when: iojs_version is defined
64
+
65
+ - name: add NodeSource repository for io.js 3.x (deb-src)
66
+ apt_repository: repo='deb-src https://deb.nodesource.com/iojs_3.x {{ ansible_distribution_release|lower }} main' state=present
67
+ when: iojs_version is defined
68
+
69
+ - name: add NodeSource repository for io.js 2.x (deb-src)
70
+ apt_repository: repo='deb-src https://deb.nodesource.com/iojs_2.x {{ ansible_distribution_release|lower }} main' state=present
71
+ when: iojs_version is defined
72
+
73
+ - name: add NodeSource repository for io.js 1.x (deb-src)
74
+ apt_repository: repo='deb-src https://deb.nodesource.com/iojs_1.x {{ ansible_distribution_release|lower }} main' state=present
75
+ when: iojs_version is defined
76
+
77
+
78
+
79
+
80
+ - name: install Node.js with specific version
81
+ apt: name={{ item }} update_cache=yes state=present force=yes
82
+ with_items: [ "nodejs={{ nodejs_version }}*" ]
83
+ when: nodejs_version is defined
84
+
85
+ - name: install io.js with specific version
86
+ apt: name={{ item }} update_cache=yes state=present force=yes
87
+ with_items: [ "iojs={{ iojs_version }}*" ]
88
+ when: iojs_version is defined
@@ -0,0 +1,34 @@
1
+ ---
2
+ # file: tasks/use-yum.yml
3
+ #
4
+ # Configure Node.js from YUM repository.
5
+ #
6
+ # @see https://github.com/nodesource/distributions
7
+ #
8
+
9
+ - name: install libselinux-python binary for Ansible to work
10
+ yum: name=libselinux-python state=present
11
+
12
+ - name: install tools for compiling native addons from npm
13
+ yum: name={{ item }} state=present
14
+ with_items:
15
+ - gcc-c++
16
+ - make
17
+ when: nodejs_compile
18
+
19
+
20
+
21
+ - name: add NodeSource official repository for CentOS
22
+ yum: name=https://rpm.nodesource.com/pub/el/{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/nodesource-release-el{{ ansible_distribution_major_version }}-1.noarch.rpm state=present
23
+
24
+
25
+
26
+ - name: install Node.js with specific version
27
+ yum: name={{ item }} update_cache=yes state=present
28
+ with_items: [ "nodejs-{{ nodejs_version }}*" ]
29
+ when: nodejs_version is defined
30
+
31
+ #- name: install io.js with specific version
32
+ # yum: name={{ item }} update_cache=yes state=present
33
+ # with_items: [ "iojs-{{ iojs_version }}*" ]
34
+ # when: iojs_version is defined