-
Notifications
You must be signed in to change notification settings - Fork 4
/
get_local_repo_files.yml
44 lines (40 loc) · 1.45 KB
/
get_local_repo_files.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
---
- hosts: docker_odoo
name: Get local repo files Playbook
gather_facts: false
become: false
connection: local
vars:
instance: "odootest"
item: "{{ {'key': instance, 'value': odoo_instances[instance]} }}"
instance_odoo_setup: "{{ odoo_setup_conf[item.value.odoo_setup_version | default(odoo_setup_version)] }}"
tasks:
- name: Create templates directory
ansible.builtin.file:
name: templates
state: directory
mode: '0755'
delegate_to: localhost
- name: Get odoo template files
ansible.builtin.get_url:
url: "https://sources.le-filament.com/lefilament/ansible-roles/docker_odoo/-/raw/master/templates/{{ file }}"
dest: "templates/{{ file }}"
mode: '0644'
with_items:
- repos.yaml.j2
- repos-addons.yaml.j2
loop_control:
loop_var: file
delegate_to: localhost
- name: Set repos.yaml variables from template
ansible.builtin.template:
src: "templates/repos.yaml.j2"
dest: "templates/{{ inventory_hostname }}.repos.yaml"
mode: '0644'
delegate_to: localhost
- name: Set repos-addons.yaml variables from template
ansible.builtin.template:
src: "templates/repos-addons.yaml.j2"
dest: "templates/{{ inventory_hostname }}.repos-addons.yaml"
mode: '0644'
delegate_to: localhost