Score:0

How can I make Ansible Playbook to Continue after IP Change?

re flag
UME

I have a playbook which configures Static IP Address and reboots the Server. However, the playbook is resulting in an error. Even the following code also doesn't seems working


    - name: Creating Interface Configuration using JINJA2 Temlate
      template:
        src: templates/interface_config.jinja2
        dest: "/etc/sysconfig/network-scripts/ifcfg-{{ nat_int }}"

    - name: Reboot Server
      become: yes
      reboot:
        reboot_timeout: 180
        
    ## Setting Fact for New IP Address

    - name: Setting Fact for New IP Address
      set_fact:
        ansible_host: "192.168.1.253"
in flag
Please provide the actual error message you encounter
U880D avatar
ca flag
"_How to make Ansible Playbook to Continue after IP Change?_", if using DNS and FQDN and in Ansible inventory there should be no need for that.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.