Skip to content

Commit

Permalink
#1877 use public IP
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Feb 27, 2024
1 parent f73aa05 commit 366f5de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/rultor/agents/aws/AwsEc2Instance.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ public String id() {
}

/**
* Instance Ip.
* @return Instance Ipv6 address
* Instance IP.
* @return Instance IP address
* @checkstyle MethodNameCheck (3 lines)
*/
public String ipv6() {
return this.instance.getIpv6Address();
public String address() {
return this.instance.getPublicIpAddress();
}
}
4 changes: 2 additions & 2 deletions src/main/java/com/rultor/agents/aws/StartsInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ public Iterable<Directive> process(final XML xml) throws IOException {
}
Logger.info(
this, "EC2 instance %s on %s started in %s",
inst.id(), inst.ipv6(),
inst.id(), inst.address(),
xml.xpath("/talk/@name").get(0)
);
dirs.xpath("/talk").add("ec2")
.attr("id", inst.id());
dirs.xpath("/talk").add("shell")
.attr("id", hash)
.add("host").set(inst.ipv6()).up()
.add("host").set(inst.address()).up()
.add("port").set(Integer.toString(this.shell.port())).up()
.add("login").set(login).up()
.add("key").set(key);
Expand Down

0 comments on commit 366f5de

Please sign in to comment.