Skip to content

Commit

Permalink
ansible and unifi terraform changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jlilja committed Oct 7, 2024
1 parent 9bc9086 commit 65c57b7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
11 changes: 8 additions & 3 deletions ansible/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ tasks:
desc: "Configure edgerouter"
dir: "ansible"
cmds:
- ansible-playbook -i ./hosts.yml ./configure-edgerouter.yml --ask-pass
- ansible-playbook -i $INVENTORY $PLAYBOOK --ask-pass
env:
INVENTORY: hosts.yml
PLAYBOOK: configure-edgerouter.yml

bootstrap_pihole:
desc: "Run playbook meant for an initial setup of a Pihole on a Raspberry Pi"
Expand All @@ -17,7 +20,7 @@ tasks:
INVENTORY: hosts.yml
PLAYBOOK: bootstrap-pihole.yml

update_packages:
pihole-apt-update:
desc: Update apt packages on machine
dir: "ansible"
cmds:
Expand All @@ -39,7 +42,9 @@ tasks:
desc: "Ping the kubernetes node(s) using ansible module ping"
dir: "ansible"
cmds:
- ansible all -i hosts.yml -m ping
- ansible all -i $INVENTORY -m ping
env:
INVENTORY: hosts.yml

install-dependencies:
desc: "Install docker and kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion ansible/configure-edgerouter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
# dhcp setup
- set service dhcp-server shared-network-name iot authoritative enable
- set service dhcp-server shared-network-name iot subnet 192.168.60.0/24 default-router 192.168.60.1 # Router
- set service dhcp-server shared-network-name iot subnet 192.168.60.0/24 dns-server 192.168.60.1 # DNS 1
- set service dhcp-server shared-network-name iot subnet 192.168.60.0/24 dns-server 192.168.30.10 # DNS 1
- set service dhcp-server shared-network-name iot subnet 192.168.60.0/24 lease 3600 # Lease time

- set service dhcp-server shared-network-name iot subnet 192.168.60.0/24 start 192.168.60.10 stop 192.168.60.254
Expand Down
11 changes: 11 additions & 0 deletions terraform/unifi/devices.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ resource "unifi_device" "USW_24_G1" {
name = "router"
}

port_override {
number = 23
name = "unifi-cloudkey" # Don't modify until ready
}

port_override {
number = 15
name = unifi_port_profile.iot.name
Expand All @@ -23,6 +28,12 @@ resource "unifi_device" "USW_24_G1" {
port_profile_id = unifi_port_profile.dns.id
}

port_override {
number = 19
name = unifi_port_profile.trusted.name

port_profile_id = unifi_port_profile.trusted.id
}
}

resource "unifi_device" "US_8_60W" {
Expand Down

0 comments on commit 65c57b7

Please sign in to comment.