blob: d96e1819acd4270c9b89d18574adc7bc7adff4f9 [file] [log] [blame]
---
# tasks file for apigee-opdk-setup-silent-file
- name: Update cache with manual_response_file if provided
cache:
key: 'manual_response_file'
value: '{{ manual_response_file }}'
when: manual_response_file is defined
- name: Construct the Edge response file
cache:
key: opdk_installation_config_file
value: "{{ opdk_installer_path }}/edge-response-{{ opdk_version }}-{{ region }}.conf"
- name: Remove the old response file
file:
path: "{{ opdk_installation_config_file }}"
state: absent
when: manual_response_file is not defined or not manual_response_file
- name: Fail if ldap password is not provided
fail:
msg: "Ldap password is required, please provide ldap password"
when: opdk_ldap_pass is not defined or opdk_ldap_pass == ""
- include: cassandra.yml
- name: Ensure that a folder exists for the file to be generated
file:
path: "{{ opdk_installation_config_file | dirname }}"
state: directory
- name: Construct name of the response file
cache:
key: 'opdk_installation_config_file'
value: '{{ opdk_installer_path }}/edge-response-{{ opdk_version }}-{{ region }}.conf'
- name: Construct the silent-install file
template:
src: 'silent-install.conf.j2'
dest: "{{ opdk_installation_config_file }}"
force: yes
owner: '{{ opdk_user_name }}'
group: '{{ opdk_group_name }}'
mode: 0655
when: manual_response_file is not defined or not manual_response_file
tags:
- no-silent-install
- name: Copy provided silent-install file
copy:
src: "{{ manual_response_file }}"
dest: "{{ opdk_installation_config_file }}"
owner: '{{ opdk_user_name }}'
group: '{{ opdk_group_name }}'
mode: 0655
when: manual_response_file is defined and manual_response_file
tags:
- no-silent-install