Ansible: Can't set variable for sequential execution
问题 I'm trying to build a playbook with rolling update use case (Sequential Execution) with the serial element. Since I have to use the serial value in multiple places in the playbook, I wanted to use it as a variable which can be used to define somewhere as a group variable. Inventory file [all] webserver1 ansible_host=10.1.1.1 ansible_user=root webserver2 ansible_host=10.1.1.2 ansible_user=root webserver3 ansible_host=10.1.1.3 ansible_user=root dbserver1 ansible_host=10.1.2.1 ansible_user=root