diff --git a/ansible/ansible.yml b/ansible/ansible.yml index 7ef707e..8531b5f 100644 --- a/ansible/ansible.yml +++ b/ansible/ansible.yml @@ -1,12 +1,13 @@ --- - hosts: all sudo: yes + vars: + packages: [rsync, git] tasks: - name: Install packages action: pacman pkg={{ item }} state=installed - with_items: - - rsync - - git + with_items: packages + when: ansible_os_family == "Archlinux" # handlers: # - name: restart ntpd # action: service name=ntpd state=restarted diff --git a/ansible/hosts b/ansible/hosts index 244787b..a61818c 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -1 +1 @@ -127.0.0.1 ansible_connection=local ansible_python_interpreter=/usr/bin/python2 package_manager=pacman +localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python2 package_manager=pacman