Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
HEV - High Energy Ventilator
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
HEV - High Energy Ventilator
Commits
6bfffa79
Commit
6bfffa79
authored
Mar 03, 2021
by
Tim Powell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added check for remote or local hosts fiel is hosts already exists
parent
cc4b357a
Pipeline
#1009
failed
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
hosts.local
ansible/playbooks/hosts.local
+1
-1
setup.sh
setup.sh
+5
-1
No files found.
ansible/playbooks/hosts.local
View file @
6bfffa79
...
...
@@ -14,7 +14,7 @@ hevpi0
hevpi1
[allpi]
IPADDRESS
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python3"
nuliv
hevpi0
hevpi1
setup.sh
View file @
6bfffa79
...
...
@@ -58,7 +58,11 @@ if [[ -f $hostsfile ]]; then
case
$yn
in
[
Yy]
*
)
create_hostsfile
;;
[
Nn]
*
)
ipaddr
=
$(
sed
-n
2p ansible/playbooks/hosts
)
;;
# copy IP address in hosts file to variable ipaddr
[
Nn]
*
)
if
[[
$(
sed
-n
2p ansible/playbooks/hosts
)
==
*
"localhost"
*
]]
;
then
local
=
True
else
ipaddr
=
$(
sed
-n
2p ansible/playbooks/hosts
)
;;
# copy IP address in hosts file to variable ipaddr
fi
*
)
echo
"Please answer yes or no."
;
exit
1
;;
esac
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment