Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This project attempts to follow [semantic versioning](https://semver.org/).

## Unreleased

## 3.0.0.rc2
## 3.0.0
* Install redis from vendor repos (BREAKING, see README)
* Removed outdated awscli role
* Added `subspace secrets rekey` to generate and rekey ansible-vault secrets
Expand Down
11 changes: 10 additions & 1 deletion ansible/roles/letsencrypt/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
delay: 1
state: stopped

- name: "Copy manual auth script"
become: true
template:
src: templates/subspace-letsencrypt-authenticator.sh
dest: /tmp/subspace-letsencrypt-authenticator.sh
owner: root
mode: '0700'

- name: Generate SSL Certificate
become: true
command:
Expand All @@ -56,7 +64,8 @@
- "--cert-name"
- "{{ le_ssl_cert.cert_name }}"
- "--{{ le_ssl_cert.plugin }}"
- "--manual-auth-hook=/bin/yes"
- "--manual-auth-hook=/tmp/subspace-letsencrypt-authenticator.sh"
- "--manual-public-ip-logging-ok"
- "--agree-tos"
- "--expand"
- "--non-interactive"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

echo CERTBOT_VALIDATION=$CERTBOT_VALIDATION
echo CERTBOT_DOMAIN=$CERTBOT_DOMAIN
echo CERTBOT_TOKEN=$CERTBOT_TOKEN
echo CERTBOT_ALL_DOMAINS=$CERTBOT_ALL_DOMAINS


echo "for dns you need to set:"
echo "IN TXT _acme_challenge.$CERTBOT_DOMAIN \"$CERTBOT_VALIDATION\""

2 changes: 1 addition & 1 deletion ansible/roles/newrelic-infra/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

- name: Add New Relic apt repo
apt_repository:
repo: deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt focal main
repo: deb https://download.newrelic.com/infrastructure_agent/linux/apt {{ansible_distribution_release}} main
state: present
become: true

Expand Down
5 changes: 0 additions & 5 deletions ansible/roles/newrelic/handlers/main.yml

This file was deleted.

25 changes: 1 addition & 24 deletions ansible/roles/newrelic/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,4 @@
---
- name: "Deprecation notice"
ansible.builtin.debug:
msg: The 'newrelic' role in subspace is deprecated. Please migration to Newrelic One and the 'newrelic-infra' role

- name: Add New Relic apt repo
apt_repository:
repo: deb http://apt.newrelic.com/debian/ newrelic non-free
state: present
become: true

- name: Add New Relic apt key
apt_key:
url: https://download.newrelic.com/548C16BF.gpg
state: present
become: true

- name: Install New Relic server agent
apt:
pkg: newrelic-sysmond
state: present
update_cache: true
become: true

- shell: "nrsysmond-config --set license_key={{newrelic_licence}}"
become: true
notify: start newrelic agent
msg: The 'newrelic' role in subspace is deprecated. Please migrate to Newrelic One and the 'newrelic-infra' role
3 changes: 2 additions & 1 deletion ansible/roles/redis/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
- name: restart redis
become: true
systemd:
name: redis
name: redis-server
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sus

enabled: true
state: restarted
2 changes: 1 addition & 1 deletion lib/subspace/commands/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def copy(src, dest = nil)
end

def confirm_overwrite(file_path)
return true unless File.exists? file_path
return true unless File.exist? file_path
answer = ask "#{file_path} already exists. Reply 'y' to overwrite: [no] "
return answer.downcase.start_with? "y"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/subspace/commands/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def initialize(args, options)
end

def run
if File.exists? dest_dir
if File.exist? dest_dir
answer = ask "Subspace appears to be initialized. Reply 'yes' to continue anyway: [no] "
abort unless answer.chomp == "yes"
else
Expand Down
2 changes: 1 addition & 1 deletion lib/subspace/commands/secrets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def run
end

def create_local
if File.exists? File.join(project_path, "config/application.yml")
if File.exist? File.join(project_path, "config/application.yml")
answer = ask "config/application.yml already exists. Reply 'yes' to overwrite: [no] "
abort unless answer == "yes"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/subspace/commands/terraform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def update_terraformrc
def update_inventory
puts "Apply succeeded, updating inventory."
Dir.chdir "config/subspace/terraform/#{@env}" do
@output = JSON.parse `terraform output -json inventory`
@output = JSON.parse `terraform output "-json" inventory`
end
inventory.merge(@output)
inventory.write
Expand Down
4 changes: 4 additions & 0 deletions template/subspace/terraform/template/main-oxenwagen.tf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ module oxenwagen {
}

output "inventory" {
value = module.oxenwagen.inventory
}

output "oxenwagen" {
value = module.oxenwagen
}

Expand Down