You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ansible-role-nginx/play-webapp/roles/common/tasks/main.yml

30 lines
837 B

---
# plays common across all servers
- name: Copy the EPEL Repository.
copy: src=epel.repo dest=/etc/yum.repos.d/epel.repo
- name: Create the GPG key for EPEL
copy: src=RPM-GPG-KEY-EPEL-6 dest=/etc/pki/rpm-gpg
- name: install Java and other dependencies
yum: name={{ item }} state=installed
with_items:
- java-1.6.0-openjdk
- java-1.6.0-openjdk-devel
- libselinux-python
- ansible
- zip
- unzip
- wget
- name: Ensure the user has a ssh key
user: name={{ ansible_ssh_user }} generate_ssh_key=yes
- name: Make sure we have the authorized_key for local user
shell: cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys ; touch ~/.ssh/key_authorized
creates=~/.ssh/key_authorized
- name: setup iptables rules
template: src=iptables.j2 dest=/etc/sysconfig/iptables
notify: restart iptables