]> git.phdru.name Git - ansible.git/commitdiff
Feat(debian-update-all-apt): Use dynamic list of hosts
authorOleg Broytman <phd@phdru.name>
Fri, 28 Jun 2019 22:21:29 +0000 (01:21 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 16 Jul 2019 18:28:36 +0000 (21:28 +0300)
Pass the list of hosts from the command line:
`ansible-playbook -e hosts=localhost -v debian-update-all-apt.yml`
Default is `all`.

playbooks/debian-update-all-apt.yml

index 223eaa285dbd97e4a150a04a8cdadf5a2c38bbb6..23a3d5dafec4e1942c10d6d70cfb01a1317b7c14 100644 (file)
@@ -1,5 +1,5 @@
 - name: Update Debian systems with apt
-  hosts: all
+  hosts: "{{ hosts | default('all') }}"
   become: yes
   gather_facts: false
   tasks: