Browse Source

ansible: use vars

pull/1/head
10sr 10 years ago
parent
commit
3972489264
2 changed files with 5 additions and 4 deletions
  1. +4
    -3
      ansible/ansible.yml
  2. +1
    -1
      ansible/hosts

+ 4
- 3
ansible/ansible.yml View File

@@ -1,12 +1,13 @@
--- ---
- hosts: all - hosts: all
sudo: yes sudo: yes
vars:
packages: [rsync, git]
tasks: tasks:
- name: Install packages - name: Install packages
action: pacman pkg={{ item }} state=installed action: pacman pkg={{ item }} state=installed
with_items:
- rsync
- git
with_items: packages
when: ansible_os_family == "Archlinux"
# handlers: # handlers:
# - name: restart ntpd # - name: restart ntpd
# action: service name=ntpd state=restarted # action: service name=ntpd state=restarted

+ 1
- 1
ansible/hosts View File

@@ -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

Loading…
Cancel
Save