Forum Discussion
vkrishna91
Oct 10, 2022Nimbostratus
Unable to use ansible playbook to upgrade BIGIP - VE to 15.1.6.1 from 15.1.5.1
Hi Team, I'm trying to utilize ansible playbook to automate our F5 upgrade. Current version: 15.1.5.1 New version: 15.1.6.1 I'm trying to utilize a bash script to dynamically identify the par...
- Oct 27, 2022
Just for anyone else who read this, the issue was a local execution
connection: local
this causes the system to SSH to itself and there is no tmsh on the ansible host. removing this line and then adding delegate_to: localhost when calling a BIG-IP module solved this issue. it allows the playbook to remote execute the code via SSH
After removing it and fixing a few code tweaks we were able to launch the code
Matt_Mabis
Oct 11, 2022Employee
Just tested with 15.1.5.1
[root@DS9 test]# ansible-playbook upgrade.yaml
PLAY [Upgrade BIG-IP software] ***************************************************************************************************************************************************
TASK [Get available volume number to use] ****************************************************************************************************************************************
changed: [test-bip]
TASK [debug] *********************************************************************************************************************************************************************
ok: [test-bip] => {
"vol": {
"changed": true,
"failed": false,
"rc": 0,
"stderr": "Shared connection to 10.192.1.199 closed.\r\n",
"stderr_lines": [
"Shared connection to 10.192.1.199 closed."
],
"stdout": "HD1.4",
"stdout_lines": [
"HD1.4"
]
}
}
TASK [COLLECT BIG-IP FACTS] ******************************************************************************************************************************************************
ok: [test-bip -> localhost]
TASK [debug] *********************************************************************************************************************************************************************
ok: [test-bip] => {
"device_facts['system_info']['product_version']": "15.1.5.1"
}
PLAY RECAP ***********************************************************************************************************************************************************************
test-bip : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
the upgrade.yaml
---
- name: Upgrade BIG-IP software
hosts: bigip_hosts
gather_facts: False
vars_files:
- vars/vars.yml
vars:
provider:
password: "{{ f5_pass }}"
server: "{{ ansible_host }}"
user: "{{ f5_user }}"
validate_certs: False
tasks:
- name: Get available volume number to use
ansible.builtin.script: "{{ playbook_dir }}/files/cal_vol.sh"
register: vol
- debug:
var: vol
- name: COLLECT BIG-IP FACTS
f5networks.f5_modules.bigip_device_info:
provider: "{{ provider }}"
gather_subset:
- system-info
register: device_facts
delegate_to: localhost
- debug:
var: device_facts['system_info']['product_version']
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects