Skip to content

Commit

Permalink
adding ks8
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmordasiewicz committed Aug 6, 2024
1 parent 5351004 commit 1a816dd
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions ansible/hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
216.254.141.2 www.bankexample.com
21 changes: 21 additions & 0 deletions ansible/playbook.yml
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
4 changes: 2 additions & 2 deletions manifests/infrastructure/fortiweb-ingress/HelmRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ spec:
kind: HelmRepository
name: fortiweb-ingress-controller
namespace: cluster-config
version: "1.0.0-1"
interval: 10m0s
install:
remediation:
retries: 3

retries: 3
1 change: 1 addition & 0 deletions terraform/hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.206.99.166 www.bankexample.com
5 changes: 5 additions & 0 deletions terraform/hub-network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ resource "azurerm_public_ip" "hub-nva-vip_public_ip" {
domain_name_label = random_pet.admin_username.id
}

output "etc_host" {
value = "sudo sh -c 'echo ${azurerm_public_ip.hub-nva-vip_public_ip.ip_address} www.bankexample.com >> /etc/host'"
description = "The public IP address of the hub NVA."
}

resource "azurerm_availability_set" "hub-nva_availability_set" {
location = azurerm_resource_group.azure_resource_group.location
resource_group_name = azurerm_resource_group.azure_resource_group.name
Expand Down

0 comments on commit 1a816dd

Please sign in to comment.