Move the logic into a role and add tag

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2018-08-08 15:20:01 +02:00
parent 722a86d1b5
commit 5e39b45c3c
2 changed files with 20 additions and 14 deletions

View file

@ -44,20 +44,6 @@
- import_tasks: "{{ handlers_path }}/restart_services.yml" - import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks: tasks:
- name: ensure /srv/private dir exists with the expected permissions
file:
path: "/srv/private"
state: directory
mode: 0640
owner: root
group: fedmsg
- name: place the private variables file
copy:
src: "{{ private }}/vars_loopabull.yml"
dest: "/srv/private/vars_loopabull.yml"
mode: 0640
owner: root
group: fedmsg
- name: ensure ~/.ssh dir exists - name: ensure ~/.ssh dir exists
file: file:
path: "/home/root/.ssh/" path: "/home/root/.ssh/"

View file

@ -17,6 +17,26 @@
tags: tags:
- loopabull - loopabull
- name: ensure /srv/private dir exists with the expected permissions
file:
path: "/srv/private"
state: directory
mode: 0640
owner: root
group: fedmsg
tags:
- loopabull
- name: place the private variables file
copy:
src: "{{ private }}/vars_loopabull.yml"
dest: "/srv/private/vars_loopabull.yml"
mode: 0640
owner: root
group: fedmsg
tags:
- loopabull
- name: clone the playbooks repo into playbooks dir - name: clone the playbooks repo into playbooks dir
git: git:
repo: "https://pagure.io/Fedora-Infra/loopabull-tasks.git" repo: "https://pagure.io/Fedora-Infra/loopabull-tasks.git"