Forum Discussion
Robert_Stenger_
Oct 22, 2018Nimbostratus
My playbook:
---
- name: Onboard Playbook
hosts: i4600
gather_facts: false
vars_files:
- /home//ansible/playbooks/bigip_vars
connection: local
tasks:
- name: Manage SSHD setting on BIG-IP
bigip_device_sshd:
user: "{{ username }}"
password: "{{ password }}"
allow: all
login: enabled
banner: "enabled"
banner_text: " {{ banner_text }}"
server: "{{ inventory_hostname }}"
validate_certs: no
delegate_to: localhost
- name: Configure NTP server on BIG-IP
bigip_device_ntp:
server: "{{ inventory_hostname }}"
user: root
password: default
ntp_servers: "{{ ntp_servers }}"
validate_certs: False
delegate_to: localhost
- name: Configure BIG-IP hostname
bigip_hostname:
user: "{{ username }}"
password: "{{ password }}"
validate_certs: False
hostname: "{{ hostname }}"
delegate_to: localhost
- name: Manage BIG-IP DNS settings
bigip_device_dns:
user: "{{ username }}"
password: "{{ password }}"
name_servers: "{{ dns_servers }}"
search: "{{ dns_search_domains }}"
ip_version: "{{ ip_version }}"
validate_certs: False
delegate_to: localhost
My bigip_vars file:
username:
- 'root'
password:
- 'default'
banner_text: "This computer system and associated networks are intended for the business use of and its authorized users. The Company's computers and proprietary data and information stored on them remain at all times the property of . Subject to applicable laws and regulations, users have no right to privacy as to any information transmitted or stored in, by or through any portion of this system."
ntp_servers:
- '10.12.132.2'
- '10.12.132.3'
dns_servers:
- '10.12.59.40'
- '10.12.59.41'
dns_search_domains:
- 'local'
- 'localhost'
ip_version: 4
hostname:
- 'fna-lb01_ansible'
- 'fna-lb02_ansible'
item.name: ltm
inventory_hostname:
- '10.12.118.173'
- '10.12.118.174'
My Host file:
LAB Big IP Host file
[i2600]
10.12.118.171
10.12.118.172
[i4600]
10.12.118.173
10.12.118.174