updated file permissions and cleaned up string literals in python script.
diff --git a/library/cassandra_hosts.py b/library/cassandra_hosts.py index 7c0483f..a3b086f 100644 --- a/library/cassandra_hosts.py +++ b/library/cassandra_hosts.py
@@ -86,7 +86,8 @@ inventory_hostname = module.params['inventory_hostname'] hostvars = module.params['hostvars'] - with open('hostvars_params.json', 'w') as hostvars_file: + json_file_name = '/tmp/hostvars_params.json' + with open(json_file_name, 'w') as hostvars_file: hostvars_file.write(hostvars) # hostvars = hostvars.decode('base64')
diff --git a/tasks/main.yml b/tasks/main.yml index 25711d8..fcbb69b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -1,6 +1,7 @@ --- # tasks file for apigee-opdk-setup-silent-file - name: Remove the old response file + become: yes file: path: "{{ opdk_installation_config_file }}" state: absent @@ -16,24 +17,26 @@ when: "{{ groups['pgmaster'] is defined and groups['pgstandby'] is defined }}" - name: Construct the silent-install file + become: yes template: src: 'silent-install.conf.j2' dest: "{{ opdk_installation_config_file }}" force: yes owner: '{{ opdk_user_name }}' group: '{{ opdk_group_name }}' - mode: 0644 + mode: 0655 when: provided_response_file is not defined or not provided_response_file tags: - no-silent-install - name: Copy provided silent-install file + become: yes copy: src: "{{ provided_response_file }}" dest: "{{ opdk_installation_config_file }}" owner: '{{ opdk_user_name }}' group: '{{ opdk_group_name }}' - mode: 0644 + mode: 0655 when: provided_response_file is defined and provided_response_file tags: - no-silent-install