Re: smart Quata with thresholds details Error While using AP

22 views
Skip to first unread message
Message has been deleted

Todd Lewis

unread,
Apr 3, 2023, 6:09:56 AM4/3/23
to Ansible Project
Mustaches don't nest. Instead of
body: "{{ lookup('ansible.builtin.file', '{{ role_path }}/files/quota_details.json') }}"
use this:
body: "{{ lookup('ansible.builtin.file', role_path ~ '/files/quota_details.json') }}"

On Monday, April 3, 2023 at 4:10:32 AM UTC-4 javed khan Siddque wrote:

Hi Team ,

I am trying to create a smart Quata with thresholds details on isilon server , but got error

"msg": "Get Quota Details for ******** failed with { errors : [ { code : AEC_NOT_FOUND , message : Path not found '********' } ] } "

"path": "/ifs/myserver/MA",

when i checked with manually , i have "172.0.1.2:/ifs/myserver" already exist

===============================
main.yml
===============================

- name: "Create A Quota On 172.0.1.2 / myserver"
ansible.builtin.uri:
url: "https://172.0.1.2:8080/platform/1/quota/quotas"
user: "user"
password: "password"
method: POST
force_basic_auth: true
validate_certs: false
body_format: json
body: "{{ lookup('ansible.builtin.file', '{{ role_path }}/files/quota_details.json') }}"
status_code:
- 200
- 201
- 202
register: created_quota_details

 

 

 

================================================
{{ role_path }}/files/quota_details.json
================================================
{
"container": true,
"enforced": true,
"force": true,
"include_snapshots": false,
"path": "/ifs/myserver/MA",
"persona": null,
"thresholds": {
"advisory": 33500744908,
"hard": 41875931136,
"soft": 37688338022,
"soft_grace": 604800
},
"thresholds_include_overhead": true,
"type": "directory"
}

javed khan Siddque

unread,
Apr 3, 2023, 10:04:41 AM4/3/23
to Ansible Project
Thanks Todd,

i noticed
body: "{{ lookup('ansible.builtin.file', '{{ role_path }}/files/quota_details.json') }}" is working perfectly.

However it is looking for pre-exist path "/ifs/myserver/MA" which is not exist .
it has to be created before running to module using " dellemc.powerscale.filesystem"


- name: Create Filesystem in default (system) access zone, without Quota
  dellemc.powerscale.filesystem:
    onefs_host: "{{ isilon_ip_address_p }}"
    port_no: "8080"
    verify_ssl: false
    api_user: "{{ isilon_api_user }}"
    api_password: "{{ isilon_api_password }}"
    path: "/ifs/myserver/MA"
    owner:
      name: 'root'
      provider_type: 'ldap'
    state: "present"

   "msg": "Failed to get the owner id for root in zone System and provider ldap due to error  { errors : [ { code : AEC_BAD_REQUEST , message : Error during lookup of user 'USER:root': The authentication provider is invalid } ] } "
}

Reply all
Reply to author
Forward
0 new messages