Skip to content

Commit 3f7002d

Browse files
author
codecowboydotio
committed
bigip user addition script - has a good example of dict2items
bigip and bigiq management import - neat eaxmple and also uses ansible collections
1 parent e395326 commit 3f7002d

File tree

5 files changed

+130
-9
lines changed

5 files changed

+130
-9
lines changed

f5-bigiq-integration.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
- name: Base VE config
2+
hosts: "{{ target_hosts | default('f5') }}"
3+
connection: local
4+
gather_facts: False
5+
6+
vars:
7+
bigip_provider:
8+
server: 3.25.83.13
9+
user: root
10+
password: default
11+
validate_certs: no
12+
server_port: 8443
13+
bigiq_provider:
14+
server: 3.25.216.201
15+
user: admin
16+
password: admin
17+
validate_certs: no
18+
bigip_pool: web
19+
bigip_pool_member: 10.1.20.100
20+
bigip_pool_member_port: 80
21+
bigip_vip_port: 80
22+
bigiq_managed_device: 3.25.83.13
23+
bigiq_managed_username: admin
24+
bigiq_managed_password: admin
25+
bigiq_managed_device_port: 8443
26+
27+
28+
collections:
29+
- f5networks.f5_modules
30+
31+
tasks:
32+
- name: Create a nameserver
33+
bigip_dns_nameserver:
34+
name: foo
35+
address: 10.10.10.10
36+
service_port: '53'
37+
state: present
38+
provider: "{{ bigip_provider }}"
39+
delegate_to: localhost
40+
- name: Create pool
41+
bigip_pool:
42+
state: present
43+
name: "{{ bigip_pool }}"
44+
partition: Common
45+
lb_method: least-connections-member
46+
slow_ramp_time: 120
47+
monitors:
48+
- http
49+
provider: "{{ bigip_provider }}"
50+
delegate_to: localhost
51+
- name: Add pool member
52+
bigip_pool_member:
53+
state: present
54+
pool: "{{ bigip_pool }}"
55+
partition: Common
56+
host: "{{ bigip_pool_member }}"
57+
port: "{{ bigip_pool_member_port }}"
58+
provider: "{{ bigip_provider }}"
59+
delegate_to: localhost
60+
- name: Force full device rediscovery
61+
bigiq_device_discovery:
62+
# bigip
63+
device_address: "{{ bigiq_managed_device }}"
64+
device_username: "{{ bigiq_managed_username }}"
65+
device_password: "{{ bigiq_managed_password }}"
66+
device_port: "{{ bigiq_managed_device_port }}"
67+
modules:
68+
- ltm
69+
force: yes
70+
provider: "{{ bigiq_provider }}"
71+
delegate_to: localhost

f5-users.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
- hosts: "{{ target_hosts | default('f5') }}"
2+
gather_facts: False
3+
4+
vars:
5+
bigip_provider:
6+
server: 10.1.1.245
7+
user: admin
8+
password: admin
9+
validate_certs: no
10+
users:
11+
admin:
12+
full_path: 'admin'
13+
description: 'Admin User'
14+
p_name: 'all-partitions'
15+
p_role: 'admin'
16+
shell: 'none'
17+
backup:
18+
full_path: 'backup'
19+
description: 'backup'
20+
p_name: 'all-partitions'
21+
p_role: 'admin'
22+
shell: 'bash'
23+
foo:
24+
full_path: 'foo'
25+
description: 'foo'
26+
p_name: 'all-partitions'
27+
p_role: 'admin'
28+
shell: 'bash'
29+
bar:
30+
full_path: 'bar'
31+
description: 'bar'
32+
p_name: 'all-partitions'
33+
p_role: 'admin'
34+
shell: 'bash'
35+
36+
tasks:
37+
- name: do stuff
38+
bigip_user:
39+
username_credential: "{{ item.key }}"
40+
partition_access: "all:{{ item.value.p_role }}"
41+
shell: "{{ item.value.shell }}"
42+
state: present
43+
provider: "{{ bigip_provider }}"
44+
#full_path: "{{ item.value.full_path }}"
45+
#description: "{{ item.value.description }}"
46+
#p_name: "{{ item.value.p_name }}"
47+
loop: "{{ users | dict2items }}"
48+
vars:
49+
key: "{{ item.key }}"
50+
value: "{{ item.value }}"

roles/kafka/tasks/fedora_package.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
- name: Install selinux bindings
2-
package:
3-
name: libselinux-python
4-
state: present
1+
#- name: Install selinux bindings
2+
# package:
3+
# name: libselinux-python
4+
# state: present
55
- name: Install java
66
package:
77
name: java-openjdk-devel

roles/kafka/vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
kafka_version: 2.2.1
1+
kafka_version: 2.6.0
22

roles/nightwatch/tasks/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
package:
1515
name: nodejs
1616
state: present
17-
- name: Install libselinux-python
18-
package:
19-
name: libselinux-python
20-
state: present
17+
#- name: Install libselinux-python
18+
# package:
19+
# name: libselinux-python
20+
# state: present
2121
- name: install the chrome rpm from a remote repo
2222
dnf:
2323
name: 'https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm'

0 commit comments

Comments
 (0)