Changed link lineinfile to template
This change ensures that all link files created are built from a template rather than using the lineinfile module which will result in multiple entries per file. While these multiple entries do not break deployments they do create a slower install / upgrade time. Change-Id: I4fef53baf075c953ac73500e72f9388f7ccfa2a0 Closes-Bug: #1468587
This commit is contained in:
@@ -53,10 +53,12 @@
|
||||
- lock-pip-files
|
||||
|
||||
- name: Drop pip link file(s)
|
||||
lineinfile:
|
||||
template:
|
||||
src: "link_file.j2"
|
||||
dest: "{{ ansible_env.HOME }}/.pip/links.d/{{ item.name }}.link"
|
||||
line: "{{ item.link }}"
|
||||
create: "yes"
|
||||
owner: "{{ ansible_user_id }}"
|
||||
group: "{{ ansible_user_id }}"
|
||||
mode: "{{ item.mode|default('0644') }}"
|
||||
with_items: pip_links
|
||||
tags:
|
||||
- lock-pip-files
|
||||
|
||||
1
playbooks/roles/pip_lock_down/templates/link_file.j2
Normal file
1
playbooks/roles/pip_lock_down/templates/link_file.j2
Normal file
@@ -0,0 +1 @@
|
||||
{{ item.link }}
|
||||
Reference in New Issue
Block a user