Skip to content

Commit

Permalink
Merge pull request #59 from redBorder/development
Browse files Browse the repository at this point in the history
Release 2.2.1
  • Loading branch information
malvads authored Jan 17, 2025
2 parents ef81ad6 + f6df190 commit cd6bfe0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cookbook-rb-ips CHANGELOG
===============

## 2.2.1

- Miguel Negrón
- [4879977] Create redborder user and key in cloud mode

## 2.2.0

- Luis Blanco
Expand Down
2 changes: 1 addition & 1 deletion resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
maintainer_email '[email protected]'
license 'AGPL-3.0'
description 'Installs/Configures redborder ips'
version '2.2.0'
version '2.2.1'

depends 'rb-common'
depends 'geoip'
Expand Down
41 changes: 20 additions & 21 deletions resources/recipes/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,33 +160,32 @@
ssh_secrets = {}
end

unless node['redborder']['cloud']
# ssh user for webui execute commands on
execute 'create_user_redBorder' do
command 'sudo useradd -m -s /bin/bash redborder'
not_if 'getent passwd redborder'
end
# ssh user for webui execute commands on
execute 'create_user_redBorder' do
command 'sudo useradd -m -s /bin/bash redborder'
not_if 'getent passwd redborder'
end

directory '/home/redborder/.ssh' do
owner 'redborder'
group 'redborder'
mode '0755'
action :create
end

directory '/home/redborder/.ssh' do
unless ssh_secrets.empty? || ssh_secrets['public_rsa'].nil?
template '/home/redborder/.ssh/authorized_keys' do
source 'rsa.pub.erb'
owner 'redborder'
group 'redborder'
mode '0755'
mode '0600'
variables(
public_rsa: ssh_secrets['public_rsa']
)
action :create
end

unless ssh_secrets.empty? || ssh_secrets['public_rsa'].nil?
template '/home/redborder/.ssh/authorized_keys' do
source 'rsa.pub.erb'
owner 'redborder'
group 'redborder'
mode '0600'
variables(
public_rsa: ssh_secrets['public_rsa']
)
action :create
end
end
end

# template "/opt/rb/etc/sysconfig/iptables" do
# source "iptables.erb"
# owner "root"
Expand Down

0 comments on commit cd6bfe0

Please sign in to comment.