suitmymind-ubuntu-machine 0.4.6.2 → 0.4.7
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.
@@ -6,9 +6,16 @@ namespace :machine do
|
|
6
6
|
set :user, 'root'
|
7
7
|
|
8
8
|
run_and_watch_prompt("passwd", [/Enter new UNIX password/, /Retype new UNIX password:/])
|
9
|
-
|
9
|
+
|
10
10
|
run_and_watch_prompt("adduser #{user_to_create}", [/Enter new UNIX password/, /Retype new UNIX password:/, /\[\]\:/, /\[y\/N\]/i])
|
11
11
|
|
12
|
+
# force the non-interactive mode
|
13
|
+
run "cat /etc/environment > ~/environment.tmp"
|
14
|
+
run 'echo DEBIAN_FRONTEND=noninteractive >> ~/environment.tmp'
|
15
|
+
sudo 'mv ~/environment.tmp /etc/environment'
|
16
|
+
# prevent this env variable to be skipped by sudo
|
17
|
+
run "echo 'Defaults env_keep = \"DEBIAN_FRONTEND\"' >> /etc/sudoers"
|
18
|
+
|
12
19
|
run "echo '#{user_to_create} ALL=(ALL)ALL' >> /etc/sudoers"
|
13
20
|
run "echo 'AllowUsers #{user_to_create}' >> /etc/ssh/sshd_config"
|
14
21
|
run "/etc/init.d/ssh reload"
|
@@ -49,11 +49,10 @@ namespace :mysql do
|
|
49
49
|
task :install, :roles => :db do
|
50
50
|
db_root_password = Capistrano::CLI.ui.ask("Choose a MySQL root password : ")
|
51
51
|
|
52
|
-
|
53
|
-
sudo "aptitude install -y mysql-server mysql-client libmysqlclient15-dev"
|
52
|
+
sudo "aptitude install -y mysql-server mysql-client libmysqlclient15-dev"
|
54
53
|
run "mysqladmin -u root password #{db_root_password}"
|
55
54
|
end
|
56
|
-
|
55
|
+
|
57
56
|
desc "Ask for a MySQL user and change his password"
|
58
57
|
task :change_password, :roles => :db do
|
59
58
|
user_to_update = Capistrano::CLI.ui.ask("Name of the MySQL user whose you want to update the password : ")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: suitmymind-ubuntu-machine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Balthazar
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02-
|
12
|
+
date: 2009-02-27 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|