Wow, great. I moved to default the way you did it. reboot is now in effect. Thank you very much for your help.
Original Message:
Sent: Wed May 29, 2024 03:29 AM
From: Chris Gibson
Subject: Reboot AIX server with ansible playbook failed
OK, try removing your current ssh_args entries and placing them under the [defaults] section, at the very top of the ansible.cfg file. Please remove the semicolon. For example:
[defaults]
# (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)
# These warnings can be silenced by adjusting this setting to False.
;action_warnings=True
host_key_checking = False
#interpreter_python = /usr/bin/python3
interpreter_python = /opt/freeware/bin/python3
[ssh_connection]
ssh_args = -o ForwardAgent=yes -o ControlPersist=30m -o ServerAliveInterval=45 -o ServerAliveCountMax=10
------------------------------
Chris Gibson
Original Message:
Sent: Wed May 29, 2024 02:43 AM
From: De Quan Qu
Subject: Reboot AIX server with ansible playbook failed
yes, has been upload attachment
------------------------------
De Quan Qu
Original Message:
Sent: Wed May 29, 2024 02:32 AM
From: Chris Gibson
Subject: Reboot AIX server with ansible playbook failed
Can you share your ansible.cfg file?
------------------------------
Chris Gibson
Original Message:
Sent: Wed May 29, 2024 02:27 AM
From: De Quan Qu
Subject: Reboot AIX server with ansible playbook failed
The same goes for removing the semicolon
------------------------------
De Quan Qu
Original Message:
Sent: Wed May 29, 2024 02:11 AM
From: Chris Gibson
Subject: Reboot AIX server with ansible playbook failed
Is that a (semicolon) ; in front of the ssh_args line? If it is, try removing it.
This is what I have in my /etc/ansible/ansible.cfg file. It works for me i.e. the AIX reboot works.
[ssh_connection]
ssh_args = -o ForwardAgent=yes -o ControlPersist=30m -o ServerAliveInterval=45 -o ServerAliveCountMax=10
------------------------------
Chris Gibson
Original Message:
Sent: Wed May 29, 2024 01:49 AM
From: De Quan Qu
Subject: Reboot AIX server with ansible playbook failed
hi,Steve Munday
I tried to add ssh parameters to the ansible.cfg file as you did, but SSH still hung after execution. I am executing yml file to add -vvv, check the execution process found the following screenshot. Is there any other way?



------------------------------
De Quan Qu
Original Message:
Sent: Thu July 20, 2023 05:25 AM
From: Steve Munday
Subject: Reboot AIX server with ansible playbook failed
Manoj,
Checking here https://github.com/IBM/ansible-power-aix/issues/191 has the following within it, have you checked your ansible.cfg parms?

Thanks, Steve
------------------------------
Steve Munday
AIX, IBM i, HMC, PowerVM
Original Message:
Sent: Thu July 20, 2023 05:18 AM
From: Steve Munday
Subject: Reboot AIX server with ansible playbook failed
Manoj,
Hi, I re-checked some (very) old notes and found the below image which is showing the Playbook times out even though the LPAR does successfully re-boot. As you can see, the Playbook does "end" unlike yours which is hanging (for some reason). Also note that I am running my Playbook within AWX (hosted on AIX thanks to @Andrey Klyachkin)

I've Emailed two members of the IBM/Ansible module team to see if they can assist.
Thanks, Steve
------------------------------
Steve Munday
AIX, IBM i, HMC, PowerVM
Original Message:
Sent: Thu July 20, 2023 04:42 AM
From: Manoj Kumar
Subject: Reboot AIX server with ansible playbook failed
Thanks Steve for share the update.
I also tried in the same way but my playbook is still hanging and not exiting but server has been rebooted.
Here is my playbook. Am I missing something here?
---
- hosts: host_name
gather_facts: false
tasks:
- name: Re-boot AIX LPAR
reboot:
pre_reboot_delay: 5
post_reboot_delay: 10
connect_timeout: 30
reboot_timeout: 180
server status
uptime
04:38AM up 7 mins, 1 user, load average: 2.33, 1.96, 1.05
Playbook status
ansible-playbook reboothost4.yml
PLAY [host_name] ***************************************************************************************************************************************************************************************************************************
TASK [Re-boot AIX LPAR] *********************************************************************************************************************************************************************************************************************
------------------------------
Manoj Kumar
Original Message:
Sent: Thu July 20, 2023 04:05 AM
From: Steve Munday
Subject: Reboot AIX server with ansible playbook failed
Manoj,
Hi, I've run the (IBM module) re-boot below as part of an AIX Gold image process.
From memory I had to play around with the pre- and post- settings so that it worked for me.
########################## ## LPAR re-boot ## ########################## - name: Re-boot AIX LPAR reboot: pre_reboot_delay: 5 post_reboot_delay: 10 connect_timeout: 30 reboot_timeout: 180
Thanks, Steve
------------------------------
Steve Munday
AIX, IBM i, HMC, PowerVM
Original Message:
Sent: Wed July 19, 2023 10:26 AM
From: Manoj Kumar
Subject: Reboot AIX server with ansible playbook failed
Hi Sanket,
We just create this playbook for testing the reboot of AIX servers. Refer little bit by Redhat reboot playbook. Do we have the playbook available for reboot in AIX?
Please guide if you have the playbook ready for reboot in AIX. We will try to use that.
------------------------------
Manoj Kumar
Original Message:
Sent: Wed July 19, 2023 09:41 AM
From: SANKET RATHI
Subject: Reboot AIX server with ansible playbook failed
Is this playbook from power_aix collection from Ansible Galaxy or this is your custom playbook?
For Ansible playbook and module on AIX from Ansible Galaxy the right forum is https://github.com/IBM/ansible-power-aix/issues
But I don't think they will be able to help in custom module/playbook.
Original Message:
Sent: 7/19/2023 9:10:00 AM
From: Manoj Kumar
Subject: Reboot AIX server with ansible playbook failed
Hi Team,
We are trying to reboot AIX server with ansible playbook, server is rebooted but playbook never exited and it got stuck. Could you please check the below playbook and let me know if I missed anything.
---
- hosts: server_name
gather_facts: false
tasks:
- name: "Reboot a machine"
reboot:
pre_reboot_delay: 0
post_reboot_delay: 0
connect_timeout: 10
reboot_timeout: 300
Regards
Manoj
------------------------------
Manoj Kumar
------------------------------