Skip to content

Commit

Permalink
Merge pull request #37 from llnagy76/fix_report_errors
Browse files Browse the repository at this point in the history
Fix report errors
  • Loading branch information
llnagy76 authored May 31, 2023
2 parents 8043354 + 7c7f599 commit dab7963
Show file tree
Hide file tree
Showing 20 changed files with 92 additions and 92 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ To install from [GitHub](https://github.com/OneIdentity/ansible-authentication-s

Using `ansible-galaxy` command:
```bash
ansible-galaxy collection install https://github.com/OneIdentity/ansible-authentication-services/releases/download/v0.2.1/oneidentity-authentication_services-0.2.1.tar.gz
ansible-galaxy collection install https://github.com/OneIdentity/ansible-authentication-services/releases/download/v0.2.2/oneidentity-authentication_services-0.2.2.tar.gz
```

The collection can also be added to a project's `requirements.yml` file
```yaml
---
collections:
- name: https://github.com/OneIdentity/ansible-authentication-services/releases/download/v0.2.1/oneidentity-authentication_services-0.2.1.tar.gz
- name: https://github.com/OneIdentity/ansible-authentication-services/releases/download/v0.2.2/oneidentity-authentication_services-0.2.2.tar.gz
```

and installed using the `ansible-galaxy` command. This method allows all required collections for a project to be specified in one place and installed with one command.
Expand Down Expand Up @@ -145,7 +145,7 @@ For local build and installation, you can clone the Git repository, build the co
The build command will generate an Ansible Galaxy collection artifact with a `tar.gz` file extension, sample output will look like the following:

```
Created collection for oneidentity.authentication_services at /home/user/ansible-authentication-services/oneidentity-authentication_services-0.2.1.tar.gz
Created collection for oneidentity.authentication_services at /home/user/ansible-authentication-services/oneidentity-authentication_services-0.2.2.tar.gz
```

`Pleae note the path shown above is just an example, the path to your build artifact will be in the root directory of the cloned repository.`
Expand All @@ -155,14 +155,14 @@ For local build and installation, you can clone the Git repository, build the co
Using `ansible-galaxy` command:

```bash
ansible-galaxy collection install /home/user/ansible-authentication-services/oneidentity-authentication_services-0.2.1.tar.gz
ansible-galaxy collection install /home/user/ansible-authentication-services/oneidentity-authentication_services-0.2.2.tar.gz
```

The collection can also be added to a project's `requirements.yml` file
```yaml
---
collections:
- name: /home/user/ansible-authentication-services/oneidentity-authentication_services-0.2.1.tar.gz
- name: /home/user/ansible-authentication-services/oneidentity-authentication_services-0.2.2.tar.gz
```

and installed using the `ansible-galaxy` command. This method allows all required collections for a project to be specified in one place and installed with one command.
Expand Down
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace: oneidentity
name: authentication_services

# Semantic versioning compliant version designation
version: "0.2.1"
version: "0.2.2"

# The path do the Markdown(.md) readme file
readme: README.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@
{% endif %}
{# Javascript object #}
{
'hostname': '{{ host }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() }}',
'hostname': '{{ host | replace("'", '\\x27') }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') | replace("'", '\\x27') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() | replace("'", '\\x27') }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() | replace("'", '\\x27') }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() | replace("'", '\\x27') }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() | replace("'", '\\x27') }}',
'sys_time': '{{ sys_time }}',
'changed': '{{ changed }}',
'unreachable': '{{ unreachable }}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@
{% endif %}
{# Javascript object #}
{
'hostname': '{{ host }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() }}',
'hostname': '{{ host | replace("'", '\\x27') }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') | replace("'", '\\x27') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() | replace("'", '\\x27') }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() | replace("'", '\\x27') }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() | replace("'", '\\x27') }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() | replace("'", '\\x27') }}',
'sys_time': '{{ sys_time }}',
'changed': '{{ changed }}',
'unreachable': '{{ unreachable }}',
Expand Down
12 changes: 6 additions & 6 deletions roles/client_join/templates/client_join_report_common.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@
{% endif %}
{# Javascript object #}
{
'hostname': '{{ host }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() }}',
'hostname': '{{ host | replace("'", '\\x27') }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') | replace("'", '\\x27') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() | replace("'", '\\x27') }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() | replace("'", '\\x27') }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() | replace("'", '\\x27') }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() | replace("'", '\\x27') }}',
'sys_time': '{{ sys_time }}',
'changed': '{{ changed }}',
'unreachable': '{{ unreachable }}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@
var data = [
{% for host in ansible_play_hosts_all | sort %}
{
'hostname': '{{ host }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() }}',
'sas version': '{{ hostvars[host]['ansible_facts']['sas_client_join_status']['version'] | default() }}',
'domain': '{{ hostvars[host]['ansible_facts']['sas_client_join_status']['domain'] | default() }}',
'hostname': '{{ host | replace("'", '\\x27') }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') | replace("'", '\\x27') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() | replace("'", '\\x27') }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() | replace("'", '\\x27') }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() | replace("'", '\\x27') }}',
'sas version': '{{ hostvars[host]['ansible_facts']['sas_client_join_status']['version'] | default() | replace("'", '\\x27') }}',
'domain': '{{ hostvars[host]['ansible_facts']['sas_client_join_status']['domain'] | default() | replace("'", '\\x27') }}',
'unreachable': '{{ hostvars[host]['ansible_facts']['sas_client']['unreachable'] | default() }}',
'failed': '{{ hostvars[host]['ansible_facts']['sas_client']['failed'] | default() }}',
},
Expand Down
2 changes: 1 addition & 1 deletion roles/client_preflight/tasks/preflight_with_copy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- include_tasks: preflight.yml

# Remove temporary directory
- include_tasks: utils/temp_dir_delete.yml
# - include_tasks: utils/temp_dir_delete.yml

vars:
package: preflight
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@
{% endif %}
{# Javascript object #}
{
'hostname': '{{ host }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() }}',
'hostname': '{{ host | replace("'", '\\x27') }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') | replace("'", '\\x27') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() | replace("'", '\\x27') }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() | replace("'", '\\x27') }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() | replace("'", '\\x27') }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() | replace("'", '\\x27') }}',
'sys_time': '{{ sys_time }}',
'changed': '{{ changed }}',
'unreachable': '{{ unreachable }}',
Expand Down
2 changes: 1 addition & 1 deletion roles/client_preflight/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package_src: "{{ client_sw_pkgs['packages'][package]['path'] }}"
package_file: "{{ client_sw_pkgs['packages'][package]['file'] }}"

# Copy package destination directory to variable
package_dest_dir: "{{ client_sw_tmp_dir }}/"
package_dest_dir: "{{ client_sw_tmp_dir }}/ansible-as-client_preflight/"

# Copye package destination file path to variable
package_dest: "{{ package_dest_dir }}{{ package_file }}"
6 changes: 3 additions & 3 deletions roles/client_sw/tasks/run_package_tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
loop: "{{ client_sw_pkg_state | oneidentity.authentication_services.pkgdict2items }}"

# Remove temporary directory
- include_tasks: temp_dir_delete.yml
when:
- "'present' in client_sw_pkg_state.values()"
# - include_tasks: temp_dir_delete.yml
# when:
# - "'present' in client_sw_pkg_state.values()"

# Read package versions after changes
- include_tasks: read_package_version.yml
Expand Down
12 changes: 6 additions & 6 deletions roles/client_sw/templates/client_sw_report_common.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@
{% endif %}
{# Javascript object #}
{
'hostname': '{{ host }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() }}',
'hostname': '{{ host | replace("'", '\\x27') }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') | replace("'", '\\x27') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() | replace("'", '\\x27') }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() | replace("'", '\\x27') }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() | replace("'", '\\x27') }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() | replace("'", '\\x27') }}',
'sys_time': '{{ sys_time }}',
'changed': '{{ changed }}',
'unreachable': '{{ unreachable }}',
Expand Down
2 changes: 1 addition & 1 deletion roles/client_sw/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package_src: "{{ client_sw_pkgs['packages'][package]['path'] }}"
package_file: "{{ client_sw_pkgs['packages'][package]['file'] }}"

# Copy package destination directory to variable
package_dest_dir: "{{ client_sw_tmp_dir }}/"
package_dest_dir: "{{ client_sw_tmp_dir }}/ansible-as-client_sw/"

# Copye package destination file path to variable
package_dest: "{{ package_dest_dir }}{{ package_file }}"
2 changes: 1 addition & 1 deletion roles/common/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---

collection_version: '0.2.1'
collection_version: '0.2.2'
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@
{% endif %}
{# Javascript object #}
{
'hostname': '{{ host }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() }}',
'hostname': '{{ host | replace("'", '\\x27') }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') | replace("'", '\\x27') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() | replace("'", '\\x27') }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() | replace("'", '\\x27') }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() | replace("'", '\\x27') }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() | replace("'", '\\x27') }}',
'sys_time': '{{ sys_time }}',
'changed': '{{ changed }}',
'unreachable': '{{ unreachable }}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ Report parameters:<br>
{
'unique_id': '{{ loop.index0 }}',
'num_of_groups': '{{ hostvars[host]['ansible_facts']['sas_local_unix_groups_key']['local_unix_groups'] | default() | length }}',
'hostname': '{{ host }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() }}',
'hostname': '{{ host | replace("'", '\\x27') }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') | replace("'", '\\x27') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() | replace("'", '\\x27') }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() | replace("'", '\\x27') }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() | replace("'", '\\x27') }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() | replace("'", '\\x27') }}',
'sys_time': '{{ sys_time }}',
'changed': '{{ hostvars[host]['ansible_facts']['sas_local_unix_groups']['changed'] | default(False) }}',
'unreachable': '{{ hostvars[host]['ansible_facts']['sas_local_unix_groups']['unreachable'] | default(False) }}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ Report of all local user accounts that conflict with:<br>
{
'unique_id': '{{ loop.index0 }}',
'num_of_users': '{{ hostvars[host]['ansible_facts']['sas_local_unix_user_conflicts_key']['local_unix_user_conflicts'] | default() | length }}',
'hostname': '{{ host }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() }}',
'hostname': '{{ host | replace("'", '\\x27') }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') | replace("'", '\\x27') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() | replace("'", '\\x27') }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() | replace("'", '\\x27') }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() | replace("'", '\\x27') }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() | replace("'", '\\x27') }}',
'sys_time': '{{ sys_time }}',
'changed': '{{ hostvars[host]['ansible_facts']['sas_local_unix_user_conflicts']['changed'] | default(False) }}',
'unreachable': '{{ hostvars[host]['ansible_facts']['sas_local_unix_user_conflicts']['unreachable'] | default(False) }}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ Report parameters:<br>
{
'unique_id': '{{ loop.index0 }}',
'num_of_users': '{{ hostvars[host]['ansible_facts']['sas_local_unix_users_key']['local_unix_users'] | default() | length }}',
'hostname': '{{ host }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() }}',
'hostname': '{{ host | replace("'", '\\x27') }}',
'group': '{{ hostvars[host]['group_names'] | join(', ') | replace("'", '\\x27') }}',
'ip address': '{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] | default() | replace("'", '\\x27') }}',
'os distro': '{{ hostvars[host]['ansible_facts']['distribution'] | default() | replace("'", '\\x27') }}',
'os version': '{{ hostvars[host]['ansible_facts']['distribution_version'] | default() | replace("'", '\\x27') }}',
'hw arch': '{{ hostvars[host]['ansible_facts']['architecture'] | default() | replace("'", '\\x27') }}',
'sys_time': '{{ sys_time }}',
'changed': '{{ hostvars[host]['ansible_facts']['sas_local_unix_users']['changed'] | default(False) }}',
'unreachable': '{{ hostvars[host]['ansible_facts']['sas_local_unix_users']['unreachable'] | default(False) }}',
Expand Down
Loading

0 comments on commit dab7963

Please sign in to comment.