-
Notifications
You must be signed in to change notification settings - Fork 37
/
playbook.yml
49 lines (49 loc) · 1.48 KB
/
playbook.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
40
41
42
43
44
45
46
47
48
49
---
- hosts: all
become: yes
pre_tasks:
- name: Atualizando apt cache
ansible.builtin.apt:
update_cache: yes
cache_valid_time: 600
when: ansible_os_family == 'Debian'
roles:
- newrelic.newrelic-infra
- dokku_bot.ansible_dokku
- iac-role-basica
- iac-role-services
tasks:
- name: copying log files config
ansible.builtin.copy:
src: config_files/logging.yml
dest: /etc/newrelic-infra/logging.d
mode: 0644
- name: create app
dokku_app:
# change this name in your template!
app: "{{ app }}"
- name: environment configuration
dokku_config:
app: "{{ app }}"
config:
"{{ apps_config }}"
when: apps_config is defined
# ignore_errors: yes
- name: environment configuration vault
dokku_config:
app: "{{ app }}"
config:
"{{ apps_config_vault }}"
when: apps_config_vault is defined
# ignore_errors: yes
- name: Add dokku_service network to mariaquiteria
ansible.builtin.command: "dokku network:set {{ app }} attach-post-create dokku_services"
args:
creates: "/tmp/network_dokku_services_mariaquiteria_{{ env }}"
changed_when: "'molecule-idempotence-notest' not in ansible_skip_tags"
- name: Configurar o crawl production diário
ansible.builtin.cron:
name: "Crawl diario"
minute: "0"
hour: "6"
job: "dokku run {{ app }} python manage.py crawl"