Hi Tim,

Thank you so much for the Help. I am able to disable/enable the pool member 
in LTM. Much appreciated help..!!

Below are the details i used.

---
- hosts: test
  connection: local

  tasks:

  - name: Force pool member offline
    bigip_pool_member:
        server: "10.46.193.36"
        user: "testuser"
        password: "testuser123"
        host: "10.47.16.202"
        pool: "agtgissvcci-uat.vgr.com_443"
        port: "5175"
        session_state: "disabled"
        monitor_state: "disabled"
        state: "present"
 
$ ansible-playbook f5-pool-disable.yml -i ../inv/fact-host

PLAY [test] 
**************************************************************************************************************

TASK [Gathering Facts] 
***************************************************************************************************
ok: [10.46.193.36]

TASK [Force pool member offline] 
*****************************************************************************************
changed: [10.46.193.36]

PLAY RECAP 
***************************************************************************************************************
10.46.193.36               : ok=2    changed=1    unreachable=0    failed=0


Thanks
Siva Subramaniyan


On Thursday, May 25, 2017 at 5:06:18 PM UTC-6, Tim Rupp wrote:
>
> Here's an example Siva of doing what you asked about.
>
>
> https://github.com/F5Networks/f5-ansible/blob/devel/examples/pool-member-enable-disable.yaml
>
> hope that helps,
>
> -tim
>
> On Thu, May 25, 2017 at 3:37 PM, Tim <[email protected] <javascript:>> 
> wrote:
>
>> Siva,
>>
>> The example you linked to is for the node documentation of an unreleased 
>> F5 module. For future reference for anything that you find or get from "
>> f5-ansible.readthedocs.io", I would advise that you open a Github issue 
>> at F5's repository here
>>
>> https://github.com/F5Networks/f5-ansible
>>
>> Now, to address your question, the documentation for pool members that is 
>> in Ansible itself can be found at Ansible's documentation site here
>>
>> http://docs.ansible.com/ansible/bigip_pool_member_module.html
>>
>> Which mentions disabled-ness under the monitor_state and session_state 
>> arguments.
>>
>> Hope that helps,
>>
>> -tim
>>
>> On Thu, May 25, 2017 at 3:22 PM, Siva-Ansile <[email protected] 
>> <javascript:>> wrote:
>>
>>> I have tried the below to disable the LTM pool member using the play 
>>> book as below, But getting the error.
>>>
>>> Playbook:-
>>>
>>>
>>> ---
>>> - name: Force pool member offline
>>>   hosts: test
>>>   connection: local
>>>
>>>   tasks:
>>>       - name: Force pool member offline
>>>         bigip_pool_member:
>>>             server: "10.46.193.36"
>>>             user: "testuser"
>>>             password: "test123"
>>>             state: "disabled"
>>>             partition: "Common"
>>>             name: "10.46.193.36"
>>>             port: "5175"
>>>             pool: "agtgissvcci-uat.vgr.com_443"
>>>         delegate_to: localhost
>>>
>>> ================
>>>
>>> Getting the error as below:-
>>>
>>> $ ansible-playbook f5-pool-disable.yml -i ../inv/fact-host
>>>
>>> PLAY [Force pool member offline] 
>>> *****************************************************************************************
>>>
>>> TASK [Gathering Facts] 
>>> ***************************************************************************************************
>>> ok: [10.46.193.36]
>>>
>>> TASK [Force pool member offline] 
>>> *****************************************************************************************
>>> *fatal: [10.46.193.36 -> localhost]: FAILED! => {"changed": false, 
>>> "failed": true, "msg": "value of state must be one of: present,absent, got: 
>>> disabled"}*
>>>
>>> msg: value of state must be one of: present,absent, got: *disabled*
>>>         to retry, use: --limit 
>>> @/apps/ansible-scripts/f5-BigIP/playbooks/f5-pool-disable.retry
>>>
>>> PLAY RECAP 
>>> ***************************************************************************************************************
>>> 10.46.193.36               : ok=1    changed=0    unreachable=0   
>>>  failed=1
>>> ==================================
>>>
>>> But as per the steps in the below document, State option "disabled" is 
>>> valid. Please some one advice on this
>>>
>>> *http://f5-ansible.readthedocs.io/en/devel/modules/bigip_node2_module.html?highlight=LTM
>>>  
>>> <http://f5-ansible.readthedocs.io/en/devel/modules/bigip_node2_module.html?highlight=LTM>*
>>>
>>> Thanks
>>> Siva Subramaniyan
>>>
>>>
>>>
>>> On Tuesday, May 23, 2017 at 11:26:03 PM UTC-6, Siva-Ansile wrote:
>>>>
>>>> Hi There,
>>>>
>>>> Can you please share the used case Playbook for the LTM/GTM traffic 
>>>> disable in F5 Big IP.
>>>> I have the requirement to switch the Traffic during the change window 
>>>> to do the Server side deployments.
>>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected] <javascript:>.
>>> To post to this group, send email to [email protected] 
>>> <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/acd6e1ac-7850-4771-ab3c-d47d46144db5%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/ansible-project/acd6e1ac-7850-4771-ab3c-d47d46144db5%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5b372ed4-5627-4e6b-bac3-aa3dd54fa94c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to