- hosts: localhost pre_tasks: - name: install packages become: true package: name: '{{ item }}' state: present loop: '{{ packages }}' - name: add gitlab to known hosts include_role: name: common tasks_from: 'known_hosts.yml' vars: user: '{{ ansible_user_id }}' items: - { domain: '{{ gitlab_domain }}', key: '{{ gitlab_host_key }}' } roles: - common - npm tasks: - import_tasks: 'tasks/main.yml' - import_tasks: 'tasks/dotfiles.yml' - import_tasks: 'tasks/neovim.yml' - name: gather the package facts package_facts: manager: pacman - import_tasks: 'tasks/aur.yml' when: aur_packages|map(attribute='name')|list is not subset(ansible_facts.packages) - import_tasks: 'tasks/docker.yml' vars_files: - 'vars.yml'