Skip to content

Instantly share code, notes, and snippets.

View F5Training's full-sized avatar
🏠
Working from home

F5Training F5Training

🏠
Working from home
View GitHub Profile
---
- name: Change First Login Admin Password
hosts: bigipXa
gather_facts: false
connection: local
vars:
provider:
server: "{{ inventory_hostname }}"
user: "{{ admin_user }}"
password: "{{ admin_password }}"
---
- name: Play 1 - Licensing BIG-IP
hosts: bigipXa
gather_facts: no
connection: local
vars:
provider:
server: "{{ inventory_hostname }}"
user: "{{ admin_user }}"
password: "{{ admin_password }}"
---
- name: Onboard BIG-IP
hosts: bigips
gather_facts: false
connection: local
vars:
provider:
server: "{{ inventory_hostname }}"
user: "{{ admin_user }}"
password: "{{ admin_password }}"
---
- name: Reset and update passwords
hosts: bigips
gather_facts: false
connection: local
vars:
provider:
server: "{{ inventory_hostname }}"
user: "{{ admin_user }}"
password: "{{ admin_password }}"
#!/usr/bin/env bash
if [[ -f /usr/bin/tmsh ]]; then
version="BIG-IP $(tmsh show sys version | awk '/[^:]Version/ {print $2}')"
else
version="$(lsb_release -a 2>/dev/null | awk '/Description/ {print $2, $3}') $(uname -i)"
fi
echo "{\"version\": \"$version\"}"
network:
version: 2
renderer: networkd
ethernets:
ens160:
dhcp4: false
addresses:
- 10.10.1.29/16
gateway4: 10.10.17.33
nameservers:
{
"version": "13.1",
"monitor": {
"name": "test.mon",
"request": "/ping",
"response": "pong"
},
"pool": {
"name": "test.pool",
"monitor": "test.mon",
let configJson = `{
"monitor": {
"name": "test.mon",
"request": "/ping",
"response": "pong"
},
"pool": {
"name": "test.pool",
"monitor": "test.mon",
"members": [
# Replace the two X's below with your student number
host=192.168.X.31
creds=admin:f5trnX
get() { curl --silent --insecure --user $creds --request GET https://$host/mgmt/tm/"$1"; }
post() { [ "${1:0:1}" != "/" ] && path="/mgmt/tm/" || path=/; [ -v SHOW_CURL ] && >&2 echo curl --silent --insecure --user $creds --request POST --header 'Content-Type: application/json' --data '$2' https://$host$path$1; curl --silent --insecure --user $creds --request POST --header 'Content-Type: application/json' --data "$2" https://$host$path$1; }
put() { curl --silent --insecure --user $creds --request PUT --header 'Content-Type: application/json' --data "$2" https://$host/mgmt/tm/"$1"; }
#!/bin/bash
#
# Install required apt packages
#
REQUIRED_PKG=(apt-transport-https \
zsh \
ansible \
powerline \
python3 \
python3-powerline \