Greetings Created a role in which several groups of hosts with different functionalities are registered in the inventory file. In order not to litter I cite an excerpt from the code:
[elasticsearch] dev-elastic-01 ansible_host=192.168.37.10 [kibana] dev-kibana-01 ansible_host=192.168.37.10 [logstash] dev-logstash-01 ansible_host=192.168.37.15 main.yml - name: Update repositories cache and install {{app.name}} package sudo: yes apt: name: "{{item}}" state: installed update_cache: yes with_items: "{{app.name}}" app.name указан в group_vars(kibana, elastic, logstash) group_vars/elasticsearch app: name: 'elasticsearch' In a role I start installation of the program by means of the apt module. If in the inventory file you specify different addresses for hosts, there is no problem, but if you specify the same host address (for example, I want both the frontend and the backend on one host), an error occurs when the file is locked
Failed to lock apt for exclusive operation As far as I understand, due to the fact that the roles are executed in parallel, at one moment there is an appeal to the installer, who is already occupied by another process. How can I start the installation in sequence? Honestly, the ideas are over. Maybe someone faced this problem. Thanks in advance!