Maybe do something like find in: reboot without failing ansible <https://www.jeffgeerling.com/blog/2018/reboot-and-wait-reboot-complete-ansible-playbook> ? Would that work?
On Monday, October 1, 2018 at 2:12:15 PM UTC-4, Dow Bennett wrote: > > Hello! > > I am a noob in Ansible so please forgive me. I am trying to upgrade an OS9 > switch using the dellos9_command module (there is a method to upgrade OS10 > via Roles but not OS9). > > playbook: > --- > - hosts: switch1 > connection: network_cli > gather_facts: no > tasks: > - name: "Dell EMC OS9 S4048 Upgrade" > dellos9_command: > commands: > - "upgrade system > scp://user:[email protected]//home/user/FTOS-SK-9.13.0.3P1.bin a:" > interval: 500 > retries: 1 > wait_for: > - result contains successfully > > The playbook returns (after the 500 second interval): > FAILED! => {"changed": false, "failed_conditions": ["result contains > successfully"], "msg": "One or more conditional statements have not been > satisfied"} > > On the switch, I can see the connection being made and then terminate and > show that the upgrade failed. > Oct 1 13:59:11.256 EDT: %STKUNIT1-M:CP %SEC-5-LOGIN_SUCCESS: Login > successful for user user on line vty1 ( x.x.x.x ) > Oct 1 13:59:11.398 EDT: %STKUNIT1-M:CP %SEC-5-CONCURRENT_LOGIN: User user > has 2 concurrent logins > Oct 1 13:59:11.989 EDT: %STKUNIT1-M:CP %SEC-5-SSH_USAGE: Using SCP-SSH v2 > (FIPS Disabled) > Oct 1 13:59:13.721 EDT: %STKUNIT1-M:CP %CRYPTO-5-FIPS_SELF_TEST_PASSED: > [scp] FIPS crypto module self-test passed > Oct 1 13:59:21.861 EDT: %STKUNIT1-M:CP %SEC-5-LOGOUT: Exec session is > terminated for user user on line vty1 ( x.x.x.x ) (Reason : Admin Reset) > Oct 1 13:59:21.981 EDT: %STKUNIT1-M:CP %DOWNLOAD-6-UPGRADE: Upgrade failed > > > The command works manually. But what I think is happening is that the > switch responds with periodic "!" (I assume as a type of progress bar) > until it is "Installed successfully" and Ansible is taking the "!" as the > response and terminates the session. Is there some way to force the session > to stay open for a set period? I don't really need to verify the result. > > Thank you, > Dow Bennett > -- 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/8e778647-059b-462c-9b68-422f37eeb6d3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
