vagrant-junos_cli 1.0.0 → 1.0.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +2 -2
- data/example/provision.cmd +1 -1
- data/lib/vagrant/junos_cli/provisioner.rb +11 -4
- data/lib/vagrant/junos_cli/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7290a4051b7190108477a6cc4c9ac17579bfccb
|
4
|
+
data.tar.gz: 4f65b37b7f98530114626587b485b5f0a2b65ad3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7faa8159b988739028958475901d3211bcf44bf0c1bc9ffccc047ded4497de83a86849da6df86283021d1b765fb54ff1cf47f2b2085e3f27e344b491084e1b5
|
7
|
+
data.tar.gz: 436510b8b418e016238fbeedf7fc76a67438cb3fcf91b5e4f556da6cf7d998e090ed2816b0c79e7a7b0efeae5bfde36865b7a3e44087239df07505e7d6aef450
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -50,7 +50,7 @@ Note the `provision.cmd` file, referenced in the provisioner.
|
|
50
50
|
This is where your CLI commands should go.
|
51
51
|
|
52
52
|
```
|
53
|
-
configure
|
53
|
+
configure private
|
54
54
|
set interfaces em3 unit 0 family inet address 10.0.0.1/24
|
55
55
|
commit
|
56
56
|
exit
|
@@ -61,5 +61,5 @@ Run `vagrant up` and the new box is getting created with the address configured.
|
|
61
61
|
## Configuration
|
62
62
|
|
63
63
|
Junos CLI provisioner accepts most parameters available for the [Shell provisioner](https://www.vagrantup.com/docs/provisioning/shell.html).
|
64
|
-
Do not pass `args`.
|
64
|
+
Do not pass `args` or `env`.
|
65
65
|
|
data/example/provision.cmd
CHANGED
@@ -13,7 +13,7 @@ module Vagrant
|
|
13
13
|
protected
|
14
14
|
|
15
15
|
def provision_junos_cli
|
16
|
-
@machine.config.ssh.shell = 'start shell'
|
16
|
+
@machine.config.ssh.shell = 'start shell' unless @machine.config.ssh.username == 'root'
|
17
17
|
|
18
18
|
with_script_file do |path|
|
19
19
|
@machine.communicate.tap do |comm|
|
@@ -24,6 +24,12 @@ module Vagrant
|
|
24
24
|
raise Vagrant::Errors::SSHNotReady if info.nil?
|
25
25
|
end
|
26
26
|
|
27
|
+
user = info[:username]
|
28
|
+
comm.sudo("chown -R #{user} #{config.upload_path}",
|
29
|
+
error_check: false)
|
30
|
+
|
31
|
+
comm.upload(path.to_s, config.upload_path)
|
32
|
+
|
27
33
|
if config.name
|
28
34
|
@machine.ui.detail(I18n.t('vagrant.provisioners.shell.running',
|
29
35
|
script: "script: #{config.name}"))
|
@@ -41,12 +47,13 @@ if [ ! -d ~/.vagrant-junos_cli/bin ]; then\
|
|
41
47
|
/bin/ln -s /bin/echo ~/.vagrant-junos_cli/bin/printf;\
|
42
48
|
/bin/ln -s /bin/echo ~/.vagrant-junos_cli/bin/export;\
|
43
49
|
/bin/echo setenv PATH \\~/.vagrant-junos_cli/bin:\\$PATH >> ~/.cshrc;\
|
44
|
-
source ~/.cshrc;\
|
45
50
|
fi'"
|
46
51
|
|
47
|
-
cli_oneliner =
|
52
|
+
cli_oneliner = "/usr/sbin/cli -f #{config.upload_path}"
|
53
|
+
|
54
|
+
clean_up = "/bin/rm #{config.upload_path}"
|
48
55
|
|
49
|
-
[prepare, cli_oneliner].each do |command|
|
56
|
+
[prepare, cli_oneliner, clean_up].each do |command|
|
50
57
|
comm.execute(
|
51
58
|
command,
|
52
59
|
sudo: false,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-junos_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mate Farkas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -47,6 +47,7 @@ extra_rdoc_files: []
|
|
47
47
|
files:
|
48
48
|
- ".gitignore"
|
49
49
|
- ".rubocop.yml"
|
50
|
+
- CHANGELOG.md
|
50
51
|
- Gemfile
|
51
52
|
- README.md
|
52
53
|
- Rakefile
|