Debian Codegraph @

ansible_collections/dellemc/openmanage/roles/idrac_certificate/molecule/__get_helper.yml

raw symbols SCIP
1 ---
2 - name: Set the share vars
3 ansible.builtin.set_fact:
4 https_share_ip: "{{ lookup('env', 'https_share_ip') }}"
5 https_certificate_path: "{{ lookup('env', 'https_certificate_path') }}"
6 https_share_username: "{{ lookup('env', 'https_share_username') }}"
7 https_share_password: "{{ lookup('env', 'https_share_password') }}"
8 path_for_import_cert: "{{ lookup('env', 'path_for_import_cert') }}"
9
10 - name: Set fact
11 ansible.builtin.set_fact:
12 curl_cmd: "curl --insecure -u %s:%s -o %s %s"
13 curl_http_url: "{{ https_share_ip }}/{{ https_certificate_path }}"
14 per_mode: "0755"
15
16 - name: Reset the iDRAC to default and wait till the iDRAC is accessible.
17 dellemc.openmanage.idrac_reset:
18 idrac_ip: "{{ lookup('env', 'IDRAC_IP') }}"
19 idrac_user: "{{ lookup('env', 'IDRAC_USER') }}"
20 idrac_password: "{{ lookup('env', 'IDRAC_PASSWORD') }}"
21 validate_certs: false
22 reset_to_default: "Default"
23 wait_for_idrac: true
24
25 - name: Create Directory
26 ansible.builtin.file:
27 path: "{{ path_for_import_cert }}"
28 state: directory
29 mode: "{{ per_mode }}"
30 register: idrac_certificate_created_directory
31 check_mode: false
32
33 - name: Setting up certificate path
34 ansible.builtin.stat:
35 path: "{{ path_for_import_cert }}"
36 register: idrac_certificate_check_file_created
37 check_mode: false
38
39 - name: Downloading certificate file
40 ansible.builtin.get_url:
41 url: "https://{{ https_share_ip }}{{ https_certificate_path }}{{ item }}"
42 force_basic_auth: true
43 validate_certs: false
44 url_username: "{{ https_share_username }}"
45 url_password: "{{ https_share_password }}"
46 headers:
47 Authorization: "Basic {{ (https_share_username + ':' +
48 https_share_password) | b64encode }}"
49 mode: "{{ per_mode }}"
50 dest: "{{ path_for_import_cert }}"
51 check_mode: false
52 loop: "{{ idrac_cert_name }}"