Skip to content
This repository has been archived by the owner on May 1, 2021. It is now read-only.

OCI ansible module are not respecting LOG_PATH #43

Closed
plakdawa opened this issue Apr 18, 2019 · 2 comments
Closed

OCI ansible module are not respecting LOG_PATH #43

plakdawa opened this issue Apr 18, 2019 · 2 comments

Comments

@plakdawa
Copy link

plakdawa commented Apr 18, 2019

Issue Report

Describe the issue

The OCI ansible modules do not respect LOG_PATH as described in the docs.

Expected behavior

When LOG_PATH is set, we expect the log file to be written to the file. Instead it gets written to the standard location /tmp/oci_ansible_module.log.

Environment

  • OS version: Red Hat Enterprise Linux Server release 7.4 (Maipo)

  • Ansible version:

    ansible 2.7.9
  config file = None
  configured module search path = ['/home/plakdawa/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/peo-oci-toolkit/miniconda3-4.5.12/envs/py3foroci/lib/python3.6/site-packages/ansible
  executable location = /opt/peo-oci-toolkit/miniconda3-4.5.12/envs/py3foroci/bin/ansible
  python version = 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) [GCC 7.3.0]
  • OCI Python SDK version:

    2.1.4

  • OCI Ansible Modules version:

    1.6.0

Ansible playbook to reproduce the issue

   $ ls -l /tmp/*oci_ansible*
ls: cannot access /tmp/*oci_ansible*: No such file or directory

$ export LOG_PATH="/tmp/plakdawa_oci_ansible_module.log"

$ ansible-playbook get-availability-domains.yml
 [WARNING]: Unable to parse /etc/ansible/hosts as an inventory source

 [WARNING]: No inventory was parsed, only implicit localhost is available

 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'


PLAY [Get availability domains] ***********************************************************************************************************************************************************************************

TASK [Get details of all the availability domains in your tenancy (default configured region)] ********************************************************************************************************************
ok: [localhost]

TASK [debug] ******************************************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "availability-domains = {'availability_domains': [{'name': 'LDKe:PHX-AD-1', 'id': 'ocid1.availabilitydomain.oc1..aaaaaaaaupx7ga46w4xbb3fnkoh7rtyumacyb3ek6bw7bt3qff3mgt3mbrlq', 'compartment_id': 'ocid1.tenancy.oc1..aaaaaaaavbuj6cjizbiv4zjm763rbrtd3dfhpjqhmwk4zn7w5lgz7z7cmnka'}, {'name': 'LDKe:PHX-AD-2', 'id': 'ocid1.availabilitydomain.oc1..aaaaaaaac7uydq54rcymamzauv5pd23qk2g2vqlrfu5jd3y6i6qxpvvzkf7a', 'compartment_id': 'ocid1.tenancy.oc1..aaaaaaaavbuj6cjizbiv4zjm763rbrtd3dfhpjqhmwk4zn7w5lgz7z7cmnka'}, {'name': 'LDKe:PHX-AD-3', 'id': 'ocid1.availabilitydomain.oc1..aaaaaaaakemzo4ywaynz573sk4jpvwuqi7vmcuxajxfv4jjj2pthez3j2hbq', 'compartment_id': 'ocid1.tenancy.oc1..aaaaaaaavbuj6cjizbiv4zjm763rbrtd3dfhpjqhmwk4zn7w5lgz7z7cmnka'}], 'failed': False, 'changed': False}"
}

PLAY RECAP ********************************************************************************************************************************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=0   


$ ls -l /tmp/*oci_ansible*
-rw-rw-r-- 1 plakdawa plakdawa 126 Apr 18 13:32 /tmp/oci_ansible_module.log
@manojmeda
Copy link
Member

@plakdawa Thanks for reporting this. We will fix it in the next release.

nalsaber added a commit that referenced this issue May 1, 2019
Added
- Added modules to manage:
    - [Web Application Firewall Service](https://docs.cloud.oracle.com/iaas/Content/WAF/Concepts/overview.htm)
    - [Federating with Identity Providers](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/federation.htm)
    - [Oracle Identity Cloud Service Group Mapping](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/addingidcsusersandgroups.htm)
- Added the following features in existing modules:
    - New allowed values `approximateSize` and `approximateCount` for the `fields` parameter of `oci_bucket_facts` module.  These enable populating `approximate_size` and `approximate_count` in the response.
    - Adding 'primary_private_ip' and 'primary_public_ip' addresses to instance module
- Samples to demonstrate:
  - how to a launch compute instance using an app catalog image

Changed
- Minimum supported OCI Python SDK to `2.1.7`

Fixed
- Download an object from a bucket fails if file destination does not exists [issue](#46)
- OCI ansible module are not respecting LOG_PATH [issue](#43)
- Update version of Python SDK [issue](#42)
- 'oci_security_list' should handle int values for ports in playbook

Co-authored-by: Nabeel Al Saber <[email protected]>
Co-authored-by: Mike Ross <[email protected]>
@nalsaber
Copy link
Member

nalsaber commented May 1, 2019

@plakdawa This issue was resolved in release v1.8.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants