Skip to content
Snippets Groups Projects
Commit c47d1e4f authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#19 Set role header

parent a44575a9
No related branches found
No related tags found
No related merge requests found
---
# file: roles/s3/tasks/main.yml
- name: "Apt Keys"
apt_key:
url='{{ item }}'
state='present'
with_items:
- 'http://s3tools.org/repo/deb-all/stable/s3tools.key'
- name: "Apt Repositories"
apt_repository:
repo='{{ item }}'
state='present'
with_items:
- 'deb http://s3tools.org/repo/deb-all stable/'
- name: "Install more packages"
apt:
pkg='{{ item }}'
state='installed'
update_cache=yes
with_items:
- 's3cmd'
- name: "Ensure directory"
file:
dest='/opt/s3/'
owner='root'
group='root'
state='directory'
mode='775'
- name: "Copy files"
template:
src='{{ item }}'
dest='/opt/s3/{{ item }}'
with_items:
- 's3.cfg'
- name: "S3 Role"
set_fact: role_s3_started=true
tags: always
- block:
- name: "Apt Keys"
apt_key:
url='{{ item }}'
state='present'
with_items:
- 'http://s3tools.org/repo/deb-all/stable/s3tools.key'
- name: "Apt Repositories"
apt_repository:
repo='{{ item }}'
state='present'
with_items:
- 'deb http://s3tools.org/repo/deb-all stable/'
- name: "Install more packages"
apt:
pkg='{{ item }}'
state='installed'
update_cache=yes
with_items:
- 's3cmd'
- name: "Ensure directory"
file:
dest='/opt/s3/'
owner='root'
group='root'
state='directory'
mode='775'
- name: "Copy files"
template:
src='{{ item }}'
dest='/opt/s3/{{ item }}'
with_items:
- 's3.cfg'
when: '"s3" not in excluded_roles'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment