Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
slapos.package
Commits
7bb41c2f
Commit
7bb41c2f
authored
Dec 04, 2017
by
Łukasz Nowak
Committed by
Rafael Monnerat
Dec 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: Fetch public IP on CentOS
parent
602d3050
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
playbook/roles/standalone-shared/tasks/main.yml
playbook/roles/standalone-shared/tasks/main.yml
+7
-1
No files found.
playbook/roles/standalone-shared/tasks/main.yml
View file @
7bb41c2f
...
@@ -2,9 +2,15 @@
...
@@ -2,9 +2,15 @@
-
name
:
fetch shared vars
-
name
:
fetch shared vars
include_vars
:
erp5-common.yml
include_vars
:
erp5-common.yml
-
name
:
Fetch public IPv4
-
name
:
Fetch public IPv4
(Debian)
shell
:
ifconfig `route -n | grep '^0\.0\.0\.0' | head -n 1 | awk '{print $NF}'` | { IFS=' :';read r;read r r a r;echo $a; }
shell
:
ifconfig `route -n | grep '^0\.0\.0\.0' | head -n 1 | awk '{print $NF}'` | { IFS=' :';read r;read r r a r;echo $a; }
register
:
public_ipv4
register
:
public_ipv4
when
:
ansible_distribution == "Ubuntu" or ansible_distribution == "Debian"
-
name
:
Fetch public IPv4 (CentOS)
shell
:
ifconfig `route -n | grep '^0\.0\.0\.0' | head -n 1 | awk '{print $NF}'` | { IFS=' :';read r;read r a r r;echo $a; }
register
:
public_ipv4
when
:
ansible_distribution == "CentOS"
-
name
:
Store public IPv4 for other scripts
-
name
:
Store public IPv4 for other scripts
shell
:
echo "{{ public_ipv4.stdout }}" > /tmp/playbook-{{ playbook_name }}-public-ipv4
shell
:
echo "{{ public_ipv4.stdout }}" > /tmp/playbook-{{ playbook_name }}-public-ipv4
...
...
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