-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5351004
commit 1a816dd
Showing
5 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
216.254.141.2 www.bankexample.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
- name: Update /etc/hosts file on localhost | ||
hosts: localhost | ||
become: yes # Escalate privileges to modify /etc/hosts | ||
tasks: | ||
- name: Ensure temporary hosts file | ||
copy: | ||
content: "" | ||
dest: /etc/hosts.temp | ||
force: yes | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
- name: Add entry to /etc/hosts | ||
lineinfile: | ||
path: /etc/hosts.temp | ||
line: "216.254.141.2 www.bankexample.com" | ||
state: present | ||
create: yes | ||
- name: Move temporary hosts to actual hosts | ||
command: mv /etc/hosts.temp /etc/hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4.206.99.166 www.bankexample.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters