subspace 2.5.2 → 2.5.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -0
  3. data/.rspec +0 -0
  4. data/.ruby-gemset +0 -0
  5. data/.ruby-version +0 -0
  6. data/.travis.yml +0 -0
  7. data/CHANGELOG.md +18 -1
  8. data/CODE_OF_CONDUCT.md +0 -0
  9. data/Gemfile +0 -0
  10. data/LICENSE.txt +0 -0
  11. data/README.md +17 -2
  12. data/Rakefile +0 -0
  13. data/TODO +0 -0
  14. data/ansible/playbooks/local_template.yml +0 -0
  15. data/ansible/playbooks/maintenance_mode.yml +0 -0
  16. data/ansible/roles/alienvault/tasks/main.yml +0 -0
  17. data/ansible/roles/apache-rails/tasks/main.yml +0 -0
  18. data/ansible/roles/apache-rails/templates/_canonical_domain.conf +0 -0
  19. data/ansible/roles/apache-rails/templates/_rails.conf +0 -0
  20. data/ansible/roles/apache-rails/templates/project-ssl.conf +0 -0
  21. data/ansible/roles/apache-rails/templates/project.conf +0 -0
  22. data/ansible/roles/apache/defaults/main.yml +0 -0
  23. data/ansible/roles/apache/handlers/main.yml +0 -0
  24. data/ansible/roles/apache/tasks/main.yml +0 -0
  25. data/ansible/roles/apache/templates/server_status.conf +0 -0
  26. data/ansible/roles/awscli/tasks/main.yml +0 -0
  27. data/ansible/roles/collectd/defaults/main.yml +0 -0
  28. data/ansible/roles/collectd/handlers/main.yml +0 -0
  29. data/ansible/roles/collectd/tasks/main.yml +0 -0
  30. data/ansible/roles/collectd/templates/apache2.conf +0 -0
  31. data/ansible/roles/collectd/templates/delayed_job_postgres.conf +0 -0
  32. data/ansible/roles/collectd/templates/df.conf +0 -0
  33. data/ansible/roles/collectd/templates/graphite.conf +0 -0
  34. data/ansible/roles/collectd/templates/hostname.conf +0 -0
  35. data/ansible/roles/collectd/templates/nginx.conf +0 -0
  36. data/ansible/roles/collectd/templates/nodejs-process.conf +0 -0
  37. data/ansible/roles/collectd/templates/puma-process.conf +0 -0
  38. data/ansible/roles/collectd/templates/rails_lograge.conf +0 -0
  39. data/ansible/roles/common/defaults/main.yml +0 -0
  40. data/ansible/roles/common/files/sudoers-service +0 -0
  41. data/ansible/roles/common/handlers/main.yml +0 -0
  42. data/ansible/roles/common/tasks/main.yml +9 -4
  43. data/ansible/roles/common/tasks/swap.yml +0 -0
  44. data/ansible/roles/common/templates/motd +0 -0
  45. data/ansible/roles/common/templates/motd2 +0 -0
  46. data/ansible/roles/common/templates/terminalcolor +0 -0
  47. data/ansible/roles/delayed_job/README.md +0 -0
  48. data/ansible/roles/delayed_job/defaults/main.yml +0 -0
  49. data/ansible/roles/delayed_job/handlers/main.yml +0 -0
  50. data/ansible/roles/delayed_job/meta/main.yml +0 -0
  51. data/ansible/roles/delayed_job/tasks/main.yml +0 -0
  52. data/ansible/roles/delayed_job/templates/delayed-job-monit-rc +0 -0
  53. data/ansible/roles/letsencrypt/defaults/main.yml +0 -0
  54. data/ansible/roles/letsencrypt/tasks/legacy.yml +0 -0
  55. data/ansible/roles/letsencrypt/tasks/main.yml +6 -6
  56. data/ansible/roles/letsencrypt/tasks/modern.yml +19 -0
  57. data/ansible/roles/letsencrypt_dns/defaults/main.yml +0 -0
  58. data/ansible/roles/letsencrypt_dns/tasks/main.yml +0 -0
  59. data/ansible/roles/logrotate/LICENSE +0 -0
  60. data/ansible/roles/logrotate/README.md +0 -0
  61. data/ansible/roles/logrotate/defaults/main.yml +0 -0
  62. data/ansible/roles/logrotate/meta/main.yml +0 -0
  63. data/ansible/roles/logrotate/tasks/main.yml +0 -0
  64. data/ansible/roles/logrotate/templates/logrotate.d.j2 +0 -0
  65. data/ansible/roles/memcache/tasks/main.yml +0 -0
  66. data/ansible/roles/monit/files/monit-http.conf +0 -0
  67. data/ansible/roles/monit/files/sudoers-monit +0 -0
  68. data/ansible/roles/monit/handlers/main.yml +0 -0
  69. data/ansible/roles/monit/tasks/main.yml +0 -0
  70. data/ansible/roles/mtpereira.passenger/.bumpversion.cfg +0 -0
  71. data/ansible/roles/mtpereira.passenger/.gitignore +0 -0
  72. data/ansible/roles/mtpereira.passenger/LICENSE +0 -0
  73. data/ansible/roles/mtpereira.passenger/README.md +0 -0
  74. data/ansible/roles/mtpereira.passenger/defaults/main.yml +0 -0
  75. data/ansible/roles/mtpereira.passenger/handlers/main.yml +0 -0
  76. data/ansible/roles/mtpereira.passenger/meta/.galaxy_install_info +0 -0
  77. data/ansible/roles/mtpereira.passenger/meta/main.yml +0 -0
  78. data/ansible/roles/mtpereira.passenger/tasks/apt.yml +0 -0
  79. data/ansible/roles/mtpereira.passenger/tasks/main.yml +0 -0
  80. data/ansible/roles/mtpereira.passenger/tasks/pkg.yml +0 -0
  81. data/ansible/roles/mtpereira.passenger/tasks/service.yml +0 -0
  82. data/ansible/roles/mysql/meta/main.yml +0 -0
  83. data/ansible/roles/mysql/tasks/main.yml +0 -0
  84. data/ansible/roles/mysql/templates/mysql_database.yml +0 -0
  85. data/ansible/roles/mysql2_gem/meta/main.yml +0 -0
  86. data/ansible/roles/mysql2_gem/tasks/main.yml +0 -0
  87. data/ansible/roles/newrelic-infra/defaults/main.yml +2 -0
  88. data/ansible/roles/newrelic-infra/handlers/main.yml +5 -0
  89. data/ansible/roles/newrelic-infra/tasks/main.yml +33 -0
  90. data/ansible/roles/newrelic-infra/templates/logs.yml.j2 +5 -0
  91. data/ansible/roles/newrelic/handlers/main.yml +0 -0
  92. data/ansible/roles/newrelic/tasks/main.yml +4 -0
  93. data/ansible/roles/nginx-maintenance/tasks/main.yml +0 -0
  94. data/ansible/roles/nginx-rails/defaults/main.yml +0 -0
  95. data/ansible/roles/nginx-rails/tasks/main.yml +0 -0
  96. data/ansible/roles/nginx-rails/templates/_asset_cors.conf +0 -0
  97. data/ansible/roles/nginx-rails/templates/_rails.conf +0 -0
  98. data/ansible/roles/nginx-rails/templates/_upstream.conf +0 -0
  99. data/ansible/roles/nginx-rails/templates/default_server +0 -0
  100. data/ansible/roles/nginx-rails/templates/nginx-project +0 -0
  101. data/ansible/roles/nginx-rails/templates/nginx-project-ssl +0 -0
  102. data/ansible/roles/nginx/defaults/main.yml +0 -0
  103. data/ansible/roles/nginx/handlers/main.yml +0 -0
  104. data/ansible/roles/nginx/tasks/main.yml +0 -0
  105. data/ansible/roles/nginx/templates/status +0 -0
  106. data/ansible/roles/nodejs/tasks/main.yml +0 -0
  107. data/ansible/roles/papertrail/tasks/main.yml +0 -0
  108. data/ansible/roles/papertrail/templates/log_files.yml +0 -0
  109. data/ansible/roles/passenger/files/sudoers-passenger +0 -0
  110. data/ansible/roles/passenger/meta/main.yml +0 -0
  111. data/ansible/roles/passenger/tasks/main.yml +0 -0
  112. data/ansible/roles/postgresql-client/tasks/main.yml +0 -0
  113. data/ansible/roles/postgresql/README.md +0 -0
  114. data/ansible/roles/postgresql/defaults/main.yml +0 -0
  115. data/ansible/roles/postgresql/handlers/main.yml +0 -0
  116. data/ansible/roles/postgresql/meta/main.yml +0 -0
  117. data/ansible/roles/postgresql/tasks/backups.yml +0 -0
  118. data/ansible/roles/postgresql/tasks/main.yml +0 -0
  119. data/ansible/roles/puma/defaults/main.yml +0 -0
  120. data/ansible/roles/puma/meta/main.yml +0 -0
  121. data/ansible/roles/puma/tasks/main.yml +0 -0
  122. data/ansible/roles/puma/templates/etc-puma.conf +0 -0
  123. data/ansible/roles/puma/templates/puma-monit-rc +0 -0
  124. data/ansible/roles/puma/templates/puma.rb +0 -0
  125. data/ansible/roles/rails/defaults/main.yml +0 -0
  126. data/ansible/roles/rails/tasks/main.yml +0 -0
  127. data/ansible/roles/rails/templates/application.yml +0 -0
  128. data/ansible/roles/rails/templates/database.yml +0 -0
  129. data/ansible/roles/redis/defaults/main.yml +0 -0
  130. data/ansible/roles/redis/tasks/main.yml +0 -0
  131. data/ansible/roles/ruby-common/README.md +0 -0
  132. data/ansible/roles/ruby-common/defaults/main.yml +0 -0
  133. data/ansible/roles/ruby-common/meta/main.yml +0 -0
  134. data/ansible/roles/ruby-common/tasks/main.yml +0 -0
  135. data/ansible/roles/ruby-common/templates/install-ruby.j2 +0 -0
  136. data/ansible/roles/ruby-common/templates/rake-env.j2 +0 -0
  137. data/ansible/roles/ruby-common/templates/ruby-gc-wrapper.j2 +0 -0
  138. data/ansible/roles/ruby-common/vars/main.yml +0 -0
  139. data/ansible/roles/sidekiq/README.md +0 -0
  140. data/ansible/roles/sidekiq/defaults/main.yml +0 -0
  141. data/ansible/roles/sidekiq/meta/main.yml +0 -0
  142. data/ansible/roles/sidekiq/tasks/main.yml +0 -0
  143. data/ansible/roles/sidekiq/templates/sidekiq-monit-rc +0 -0
  144. data/ansible/roles/yarn/tasks/main.yml +0 -0
  145. data/ansible/roles/zenoamaro.postgresql/.gitignore +0 -0
  146. data/ansible/roles/zenoamaro.postgresql/.travis.yml +0 -0
  147. data/ansible/roles/zenoamaro.postgresql/LICENSE.md +0 -0
  148. data/ansible/roles/zenoamaro.postgresql/README.md +0 -0
  149. data/ansible/roles/zenoamaro.postgresql/Vagrantfile +0 -0
  150. data/ansible/roles/zenoamaro.postgresql/boxed.yml +0 -0
  151. data/ansible/roles/zenoamaro.postgresql/defaults/main.yml +0 -0
  152. data/ansible/roles/zenoamaro.postgresql/handlers/main.yml +0 -0
  153. data/ansible/roles/zenoamaro.postgresql/inventory +0 -0
  154. data/ansible/roles/zenoamaro.postgresql/main.yml +0 -0
  155. data/ansible/roles/zenoamaro.postgresql/meta/.galaxy_install_info +0 -0
  156. data/ansible/roles/zenoamaro.postgresql/meta/main.yml +0 -0
  157. data/ansible/roles/zenoamaro.postgresql/tasks/configure.yml +0 -0
  158. data/ansible/roles/zenoamaro.postgresql/tasks/extensions.yml +0 -0
  159. data/ansible/roles/zenoamaro.postgresql/tasks/install.yml +0 -0
  160. data/ansible/roles/zenoamaro.postgresql/tasks/main.yml +0 -0
  161. data/ansible/roles/zenoamaro.postgresql/templates/environment +0 -0
  162. data/ansible/roles/zenoamaro.postgresql/templates/pg_ctl.conf +0 -0
  163. data/ansible/roles/zenoamaro.postgresql/templates/pg_hba.conf +0 -0
  164. data/ansible/roles/zenoamaro.postgresql/templates/pg_ident.conf +0 -0
  165. data/ansible/roles/zenoamaro.postgresql/templates/postgresql.conf +0 -0
  166. data/ansible/roles/zenoamaro.postgresql/test.yml +0 -0
  167. data/lib/subspace.rb +0 -0
  168. data/lib/subspace/cli.rb +5 -0
  169. data/lib/subspace/commands/ansible.rb +0 -0
  170. data/lib/subspace/commands/base.rb +0 -0
  171. data/lib/subspace/commands/bootstrap.rb +0 -0
  172. data/lib/subspace/commands/configure.rb +0 -0
  173. data/lib/subspace/commands/init.rb +0 -0
  174. data/lib/subspace/commands/maintain.rb +0 -0
  175. data/lib/subspace/commands/maintenance_mode.rb +0 -0
  176. data/lib/subspace/commands/override.rb +0 -0
  177. data/lib/subspace/commands/provision.rb +0 -0
  178. data/lib/subspace/commands/ssh.rb +0 -0
  179. data/lib/subspace/commands/vars.rb +0 -0
  180. data/lib/subspace/configuration.rb +0 -0
  181. data/lib/subspace/version.rb +1 -1
  182. data/subspace.gemspec +0 -0
  183. data/template/provision.rb.erb +0 -0
  184. data/template/provision/.gitignore +0 -0
  185. data/template/provision/ansible.cfg.erb +0 -0
  186. data/template/provision/group_vars/all.erb +0 -0
  187. data/template/provision/group_vars/template.erb +0 -0
  188. data/template/provision/host_vars/template.erb +0 -0
  189. data/template/provision/hosts.erb +0 -0
  190. data/template/provision/playbook.yml.erb +1 -2
  191. data/template/provision/templates/application.yml.template +0 -0
  192. data/template/provision/vars/template.erb +0 -0
  193. metadata +10 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ec1fed10091007f72b23e57d0493ff65646a9bc4cf530de36adbb9fdeb8e00f
4
- data.tar.gz: fcaaff33ec9cb84b996258e74d3fc525f6fd727d0ef24b27e5bc71883fe4f95b
3
+ metadata.gz: 24d9413d60da10fc4e89a7a07acdee04a663d0ce45a1bf3c666d27b0b4b867ba
4
+ data.tar.gz: 5c6acea9ad2dd19abd20355764a3e6b5febc9281875ce0e4c5026cb86de5f3bf
5
5
  SHA512:
6
- metadata.gz: 6429f545796109a5974e7183b8de7f992caf9d47742d08e2a9676053e6b5d634ee38b0f833cdc1e875fe03a64801841eec94517bccbe3d39adb5e7340d683fc2
7
- data.tar.gz: 4afb2d4d2a0f772ec67bd923da0469c57ff65c51d65e656d7db89ef90c546cd6371c04593869ca36558c546e36e5e45788be550d2c601c17f38daa7e9c69dae9
6
+ metadata.gz: 57e1b9ea34bb641ac71f2f38297b7f1b80c2a97b7aa7c734d44826f5d252b4ead6e9cf0aa74359dd728802527848f36953c871ac37e05ebac770e506f5db8cc7
7
+ data.tar.gz: f7632eb404a54a3f034ee5dab75854d3109f97d34e9850f1886097bfe70c1e5e3d0621ef1d15cf25e8052fb0d8fe7f24317f5bedd947070039bed17094c11f3e
data/.gitignore CHANGED
File without changes
data/.rspec CHANGED
File without changes
data/.ruby-gemset CHANGED
File without changes
data/.ruby-version CHANGED
File without changes
data/.travis.yml CHANGED
File without changes
data/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This is a [changelog](https://keepachangelog.com/en/0.3.0/).
4
4
 
5
- This project attempts to follow [semantic versioning](https://semver.org/)
5
+ This project attempts to follow [semantic versioning](https://semver.org/).
6
6
 
7
7
  ## Known Bugs
8
8
 
@@ -10,6 +10,23 @@ This project attempts to follow [semantic versioning](https://semver.org/)
10
10
  * Not working on OSX - macs don't read from /etc/profile.d/
11
11
  * Stops showing color if you `sudo su`
12
12
 
13
+ ## Unreleased
14
+
15
+ ## 2.5.6
16
+ * Fix sending security stats
17
+ * Make sure apt package acl is installed in common role so ansible can become a non-privileged user
18
+
19
+ ## 2.5.5
20
+ * Remove duplicate nginx role from playbook templates
21
+ * Don't send stats if there have been no upgrades
22
+
23
+ ## 2.5.4
24
+ * certbox => certbot
25
+
26
+ ## 2.5.3
27
+ * Add a friendly error message if ansible is not installed
28
+ * Add new role to support New Relic One's infrastructure agent
29
+
13
30
  ## 2.5.2
14
31
  * Always specify the letsencrypt cert_name so they are consistent
15
32
 
data/CODE_OF_CONDUCT.md CHANGED
File without changes
data/Gemfile CHANGED
File without changes
data/LICENSE.txt CHANGED
File without changes
data/README.md CHANGED
@@ -282,6 +282,21 @@ Installs logrotate and lets you configure logs for automatic rotation. Example
282
282
 
283
283
  ## newrelic
284
284
 
285
+ ## newrelic-infra
286
+ This role will install the next-gen "Newrelic One" infrastructure agent which can perform a few different functions for newrelic. The previous "newrelic" role is deprecated.
287
+
288
+ Variables:
289
+ # Required, the newrelic license key you get after signing up.
290
+ newrelic_license: "longhashthingyougetfromnewrelichere"
291
+ # Optional - send logs to newrelic one's log aggregator.
292
+ newrelic_logs:
293
+ - name: rails-production
294
+ path: /u/apps/blah/shared/log/production.log
295
+ - name: nginx-error
296
+ path: /var/log/nginx/error.log
297
+
298
+
299
+
285
300
  ## nginx-rails
286
301
 
287
302
  Configures nginx to look at localhost:9292 for the socket/backend connection. If you need to do fancy stuff you should simply override this role
@@ -413,8 +428,8 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
413
428
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version:
414
429
 
415
430
  1. update the version number in `version.rb`
416
- 2. update the version number in motds
417
- 3. run `bundle exec rake release`
431
+ 2. `gem build subspace.gemspec`
432
+ 3. `gem push subspace-x.y.z.gem`
418
433
 
419
434
  This will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
420
435
 
data/Rakefile CHANGED
File without changes
data/TODO CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -125,6 +125,12 @@
125
125
  - maintenance
126
126
  - upgrade
127
127
 
128
+ - name: Install acl so ansible can become a non-privileged user
129
+ apt:
130
+ pkg: acl
131
+ state: present
132
+ become: true
133
+
128
134
  - name: Get os_upgrades stats
129
135
  shell:
130
136
  cmd: |
@@ -153,7 +159,7 @@
153
159
  key: os_upgrades
154
160
  value: "{{stats_os_upgrades.stdout}}"
155
161
  hostname: "{{hostname}}"
156
- when: send_stats == true and stats_url is defined and stats_api_key is defined
162
+ when: (send_stats == true) and (stats_url is defined) and (stats_api_key is defined) and (stats_os_upgrades.stdout | length > 0)
157
163
  tags:
158
164
  - maintenance
159
165
  - stats
@@ -197,9 +203,8 @@
197
203
  - name: Get os_security_upgrades stats
198
204
  shell:
199
205
  cmd: |
200
- sed -n "/$(date '+%Y-%m')/,+2p" updates.log | # Groups of lines from the current month
206
+ grep -A 1 $(date +%Y-%m) updates.log | # Groups of lines from the current month
201
207
  grep 'security' | # Only lines matching 'security'
202
- grep -P -o '(^\d+)' | #Extract the numbers at the beginning of the lines
203
208
  awk '{s+=$1} END {print s}' # Sum all the lines
204
209
  args:
205
210
  chdir: /opt/subspace
@@ -222,7 +227,7 @@
222
227
  key: os_security_upgrades
223
228
  value: "{{stats_os_security_upgrades.stdout}}"
224
229
  hostname: "{{hostname}}"
225
- when: send_stats == true and stats_url is defined and stats_api_key is defined
230
+ when: (send_stats == true) and (stats_url is defined) and (stats_api_key is defined) and (stats_os_security_upgrades.stdout | length > 0)
226
231
  tags:
227
232
  - maintenance
228
233
  - stats
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -10,7 +10,7 @@
10
10
  become: true
11
11
  ignore_errors: true
12
12
  apt:
13
- pkg: certbox
13
+ pkg: certbot
14
14
  state: present
15
15
 
16
16
  - name: "Detect if certbot was installed via APT"
@@ -52,13 +52,13 @@
52
52
  command: "{{certbot_bin}} certonly --email {{letsencrypt_email}} --domains {{item.domains | join(',')}} --cert-name {{item.cert_name}} --standalone --agree-tos --expand --non-interactive"
53
53
 
54
54
  - name: Update nginx default options
55
- when: nginx_installed is defined
55
+ when: "'nginx' in role_names"
56
56
  get_url:
57
57
  url: https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/_internal/tls_configs/options-ssl-nginx.conf
58
58
  dest: /etc/letsencrypt/options-ssl-nginx.conf
59
59
 
60
60
  - name: Update apache default options
61
- when: apache_installed is defined
61
+ when: "'apache' in role_names"
62
62
  get_url:
63
63
  url: https://raw.githubusercontent.com/certbot/certbot/master/certbot-apache/certbot_apache/options-ssl-apache.conf
64
64
  dest: /etc/letsencrypt/options-ssl-apache.conf
@@ -76,7 +76,7 @@
76
76
 
77
77
  - name: Setup cron job to auto renew
78
78
  become: true
79
- when: apache_installed is defined
79
+ when: "'apache' in role_names"
80
80
  cron:
81
81
  name: Auto-renew SSL
82
82
  job: "{{certbot_bin}} renew --no-self-upgrade --apache >> /var/log/cron.log 2>&1"
@@ -86,10 +86,10 @@
86
86
 
87
87
  - name: Setup cron job to auto renew
88
88
  become: true
89
- when: nginx_installed is defined
89
+ when: "'nginx' in role_names"
90
90
  cron:
91
91
  name: Auto-renew SSL
92
92
  job: "{{certbot_bin}} renew --no-self-upgrade --nginx >> /var/log/cron.log 2>&1"
93
93
  hour: "0"
94
94
  minute: "33"
95
- state: present
95
+ state: present
@@ -11,3 +11,22 @@
11
11
  set_fact:
12
12
  certbot_bin: "certbot"
13
13
 
14
+ - name: "Check for certbot-auto"
15
+ stat:
16
+ path: /opt/certbot/certbot-auto
17
+ register: certbot_auto_exists
18
+
19
+ - name: "Remove certbot-auto"
20
+ file:
21
+ path: /opt/certbot/certbot-auto
22
+ state: absent
23
+ when: certbot_auto_exists.stat.exists
24
+
25
+ - name: "Remove certbot-auto cron task"
26
+ cron:
27
+ name: Auto-renew SSL
28
+ job: "{{certbot_bin}} renew --no-self-upgrade --nginx >> /var/log/cron.log 2>&1"
29
+ hour: "0"
30
+ minute: "33"
31
+ state: absent
32
+ when: certbot_auto_exists.stat.exists
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ newrelic_license: ""
2
+ newrelic_logs: []
@@ -0,0 +1,5 @@
1
+ ---
2
+ - name: Restart newrelic-infra
3
+ service:
4
+ name: newrelic-infra
5
+ state: restarted
@@ -0,0 +1,33 @@
1
+ ---
2
+ - name: Add New Relic apt key
3
+ apt_key:
4
+ url: https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg
5
+ state: present
6
+ become: true
7
+
8
+ - name: create license key
9
+ copy:
10
+ dest: "/etc/newrelic-infra.yml"
11
+ content: |
12
+ license_key: {{newrelic_license}}
13
+
14
+ - name: Add New Relic apt repo
15
+ apt_repository:
16
+ repo: deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt focal main
17
+ state: present
18
+ become: true
19
+
20
+ - name: Install New Relic server agent
21
+ apt:
22
+ pkg: newrelic-infra
23
+ state: present
24
+ update_cache: true
25
+ become: true
26
+
27
+ - name: Configure application log forwarding if enabled
28
+ when: "{{ newrelic_logs|length }}"
29
+ become: true
30
+ template:
31
+ dest: "/etc/newrelic-infra/logging.d/subspace.yml"
32
+ src: logs.yml.j2
33
+ notify: Restart newrelic-infra
@@ -0,0 +1,5 @@
1
+ logs:
2
+ {% for log in newrelic_logs %}
3
+ - name: {{log.name}}
4
+ file: {{log.path}}
5
+ {% endfor %}
File without changes
@@ -1,4 +1,8 @@
1
1
  ---
2
+ - name: "Deprecation notice"
3
+ ansible.builtin.debug:
4
+ msg: The 'newrelic' role in subspace is deprecated. Please migration to Newrelic One and the 'newrelic-infra' role
5
+
2
6
  - name: Add New Relic apt repo
3
7
  apt_repository:
4
8
  repo: deb http://apt.newrelic.com/debian/ newrelic non-free
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/subspace.rb CHANGED
File without changes
data/lib/subspace/cli.rb CHANGED
@@ -24,6 +24,11 @@ class Subspace::Cli
24
24
  program :version, Subspace::VERSION
25
25
  program :description, 'Ansible-backed server provisioning tool for rails'
26
26
 
27
+ unless system("which ansible > /dev/null")
28
+ puts "*** Subspace depends on ansible being on your PATH. Please install it: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html"
29
+ exit 1
30
+ end
31
+
27
32
  command :init do |c|
28
33
  c.syntax = 'subspace init [vars]'
29
34
  c.summary = 'Run without options to initialize subspace.'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module Subspace
2
- VERSION = "2.5.2"
2
+ VERSION = "2.5.6"
3
3
  end
data/subspace.gemspec CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -12,9 +12,8 @@
12
12
  - ruby-common
13
13
  - rails
14
14
  - puma
15
- - nginx
16
15
  - letsencrypt
17
- - nginx # This is included twice intentionally. I think there is a bug that is fixed by running it both before and after the letsencrypt role.
16
+ - nginx
18
17
  - postgresql
19
18
  - monit
20
19
  - logrotate
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Samson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-02 00:00:00.000000000 Z
11
+ date: 2021-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -173,6 +173,10 @@ files:
173
173
  - ansible/roles/mysql/templates/mysql_database.yml
174
174
  - ansible/roles/mysql2_gem/meta/main.yml
175
175
  - ansible/roles/mysql2_gem/tasks/main.yml
176
+ - ansible/roles/newrelic-infra/defaults/main.yml
177
+ - ansible/roles/newrelic-infra/handlers/main.yml
178
+ - ansible/roles/newrelic-infra/tasks/main.yml
179
+ - ansible/roles/newrelic-infra/templates/logs.yml.j2
176
180
  - ansible/roles/newrelic/handlers/main.yml
177
181
  - ansible/roles/newrelic/tasks/main.yml
178
182
  - ansible/roles/nginx-maintenance/tasks/main.yml
@@ -291,7 +295,7 @@ licenses:
291
295
  - MIT
292
296
  metadata:
293
297
  allowed_push_host: https://rubygems.org
294
- post_install_message:
298
+ post_install_message:
295
299
  rdoc_options: []
296
300
  require_paths:
297
301
  - lib
@@ -306,8 +310,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
306
310
  - !ruby/object:Gem::Version
307
311
  version: '0'
308
312
  requirements: []
309
- rubygems_version: 3.0.8
310
- signing_key:
313
+ rubygems_version: 3.0.3
314
+ signing_key:
311
315
  specification_version: 4
312
316
  summary: Ansible-based server provisioning for rails projects
313
317
  test_files: []