forked from VerosK/vagrant-ansible-semaphore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.yml
39 lines (35 loc) · 920 Bytes
/
site.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
- name: Setup EPEL
hosts: all
tags: common
tasks:
- name: Disable SELinux for the demo
selinux:
policy: targeted
state: permissive
- name: Install EPEL
yum:
name: epel-release
state: present
- name: Add authorized key
authorized_key:
user: root
key: '{{ demo_ssh_key_public }}'
state: present
- name: Setup Ansible semaphore with requisities
hosts: semaphore
tags: semaphore
roles:
- role: geerlingguy.mysql
- role: VerosK.nginx
- role: local.semaphore
- name: Disable SSH host key checking in demo
hosts: semaphore
tasks:
- name: Create ansible.cfg
# Don't do this in production, please
copy:
dest: '{{ semaphore_home }}/.ansible.cfg'
content: "[defaults]\nhost_key_checking = False\n"
owner: '{{ semaphore_user }}'
group: '{{ semaphore_user }}'