---
# This role contains common plays that will run on all nodes.

- name: Install EPEL 7
  yum: name=http://fedora.mirrors.pair.com/epel/7/x86_64/e/epel-release-7-1.noarch.rpm state=present

- name: yum update all the things
  yum: name=* state=latest

- name: remove some useless packages
  yum: name={{ item }} state=absent
  with_items:
  - puppet
  - chef

- name: add routes
  template: src=ifcfg-eth1.j2 dest=/etc/sysconfig/network-scripts/ifcfg-eth1

- name: turn off eth0
  template: src=ifcfg-eth0.j2 dest=/etc/sysconfig/network-scripts/ifcfg-eth0

- name: fix resolv.conf
  template: src=resolv.conf.j2 dest=/etc/resolv.conf

- name: set up authorized keys for demo boxes
  authorized_key: user=vagrant key="{{ lookup('file', 'id_rsa.pub') }}"
    manage_dir=yes state=present 

- name: fix permissions
  shell: sudo chown -R vagrant.vagrant /home/vagrant

- name: restart machine 
  command: shutdown -r now "Ansible updates triggered"
  async: 0
  poll: 0
  ignore_errors: true
  when: inventory_hostname != "tower"

- name: waiting for server to come back
  pause: seconds=30
  when: inventory_hostname != "tower"
---
# This role contains common plays that will run on all nodes.

- name: Install EPEL 7
  yum: name=http://fedora.mirrors.pair.com/epel/7/x86_64/e/epel-release-7-5.noarch.rpm state=present

- name: yum update all the things
  yum: name=* state=latest

- name: remove some useless packages
  yum: name={{ item }} state=absent
  with_items:
  - puppet
  - chef

- name: add routes
  template: src=ifcfg-eth1.j2 dest=/etc/sysconfig/network-scripts/ifcfg-eth1

- name: turn off eth0
  template: src=ifcfg-eth0.j2 dest=/etc/sysconfig/network-scripts/ifcfg-eth0

- name: fix resolv.conf
  template: src=resolv.conf.j2 dest=/etc/resolv.conf

- name: set up authorized keys for demo boxes
  authorized_key: user=vagrant key="{{ lookup('file', 'id_rsa.pub') }}"
    manage_dir=yes state=present 

- name: fix permissions
  shell: sudo chown -R vagrant.vagrant /home/vagrant

- name: restart machine 
  command: shutdown -r now "Ansible updates triggered"
  async: 0
  poll: 0
  ignore_errors: true
  when: inventory_hostname != "tower"

- name: waiting for server to come back
  pause: seconds=30
  when: inventory_hostname != "tower"

Fix 404 link on epel-release
Fix 404 link on epel-release
