File tree Expand file tree Collapse file tree 9 files changed +39
-44
lines changed
roles/filetree_create/tasks Expand file tree Collapse file tree 9 files changed +39
-44
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ bugfixes :
3
+ - Fixed issue with loops that were getting always empty list of objects
Original file line number Diff line number Diff line change 53
53
mode : ' 0755'
54
54
vars :
55
55
__path : " {{ output_path }}/{{ needed_path | regex_replace('/', '_') }}/applications"
56
- loop : >-
57
- {{ (applications_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
58
- map(attribute='organization') | map(attribute='name') | list | flatten | unique)
59
- + ([default(organization)] if ((applications_lookvar | map(attribute='summary_fields')
60
- | selectattr('organization', 'undefined') | list | flatten) | length > 0) else [])
61
- }}
56
+ loop : " {{ (applications_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
57
+ map(attribute='organization') | map(attribute='name') | list | flatten | unique)
58
+ + ([organization] if ((applications_lookvar | map(attribute='summary_fields')
59
+ | selectattr('organization', 'undefined') | list | flatten) | length > 0) else [])
60
+ }}"
62
61
loop_control :
63
62
loop_var : needed_path
64
63
label : " {{ __path }}"
Original file line number Diff line number Diff line change 53
53
mode : ' 0755'
54
54
vars :
55
55
__path : " {{ output_path }}/{{ needed_path }}/credentials"
56
- loop : >-
57
- {{ (credentials_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
58
- map(attribute='organization') | map(attribute='name') | list | flatten | unique)
59
- + ([(organization if organization is defined else 'ORGANIZATIONLESS')] if ((credentials_lookvar |
60
- map(attribute='summary_fields') | selectattr('organization', 'undefined') | list | flatten) | length > 0) else [])
61
- }}
56
+ loop : " {{ (credentials_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
57
+ map(attribute='organization') | map(attribute='name') | list | flatten | unique)
58
+ + ([organization] if ((credentials_lookvar |
59
+ map(attribute='summary_fields') | selectattr('organization', 'undefined') | list | flatten) | length > 0) else [])
60
+ }}"
62
61
loop_control :
63
62
loop_var : needed_path
64
63
label : " {{ __path }}"
Original file line number Diff line number Diff line change 87
87
mode : ' 0755'
88
88
vars :
89
89
__path : " {{ output_path }}/{{ needed_path | regex_replace('/', '_') }}/job_templates"
90
- loop : >-
91
- {{ (job_templates_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
92
- map(attribute='organization') | map(attribute='name') | list | flatten | unique) +
93
- [organization] if (job_templates_lookvar | map(attribute='summary_fields') |
94
- selectattr('organization', 'undefined') | list | flatten | length > 0) else []
95
- }}
90
+ loop : " {{ (job_templates_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
91
+ map(attribute='organization') | map(attribute='name') | list | flatten | unique) +
92
+ ([organization] if ((job_templates_lookvar | map(attribute='summary_fields') |
93
+ selectattr('organization', 'undefined') | list | flatten) | length > 0) else [])
94
+ }}"
96
95
loop_control :
97
96
loop_var : needed_path
98
97
label : " {{ __path }}"
Original file line number Diff line number Diff line change 54
54
vars :
55
55
__path : " {{ output_path }}/{{ needed_path | regex_replace('/', '_') }}/labels"
56
56
loop : " {{ (labels_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') | map(attribute='organization') | map(attribute='name') | list | flatten | unique)
57
- + (['ORGANIZATIONLESS' ] if ((labels_lookvar | map(attribute='summary_fields') | selectattr('organization', 'undefined') | list | flatten) | length > 0) else [])
57
+ + ([organization ] if ((labels_lookvar | map(attribute='summary_fields') | selectattr('organization', 'undefined') | list | flatten) | length > 0) else [])
58
58
}}"
59
59
loop_control :
60
60
loop_var : needed_path
Original file line number Diff line number Diff line change 50
50
mode : ' 0755'
51
51
vars :
52
52
__path : " {{ output_path }}/{{ needed_path | regex_replace('/', '_') }}/notification_templates"
53
- loop : >-
54
- {{ (notification_templates_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
55
- map(attribute='organization') | map(attribute='name') | list | flatten | unique) +
56
- [organization] if (notification_templates_lookvar | map(attribute='summary_fields') |
57
- selectattr('organization', 'undefined') | list | flatten | length > 0) else []
58
- }}
53
+ loop : " {{ (notification_templates_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
54
+ map(attribute='organization') | map(attribute='name') | list | flatten | unique) +
55
+ ([organization] if ((notification_templates_lookvar | map(attribute='summary_fields') |
56
+ selectattr('organization', 'undefined') | list | flatten) | length > 0) else [])
57
+ }}"
59
58
loop_control :
60
59
loop_var : needed_path
61
60
label : " {{ __path }}"
Original file line number Diff line number Diff line change 64
64
mode : ' 0755'
65
65
vars :
66
66
__path : " {{ output_path }}/{{ needed_path | regex_replace('/', '_') }}/projects"
67
- loop : >-
68
- {{ (projects_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
69
- map(attribute='organization') | map(attribute='name') | list | flatten | unique) +
70
- [organization] if (projects_lookvar | map(attribute='summary_fields') |
71
- selectattr('organization', 'undefined') | list | flatten | length > 0) else []
72
- }}"
67
+ loop : " {{ (projects_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
68
+ map(attribute='organization') | map(attribute='name') | list | flatten | unique) +
69
+ ([organization] if ((projects_lookvar | map(attribute='summary_fields') |
70
+ selectattr('organization', 'undefined') | list) | flatten | length > 0) else [])
71
+ }}"
73
72
loop_control :
74
73
loop_var : needed_path
75
74
label : " {{ __path }}"
Original file line number Diff line number Diff line change 53
53
mode : ' 0755'
54
54
vars :
55
55
__path : " {{ output_path }}/{{ needed_path | regex_replace('/', '_') }}/teams"
56
- loop : >-
57
- {{
58
- (teams_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
59
- map(attribute='organization') | map(attribute='name') | list | unique) +
60
- [organization] if (teams_lookvar | map(attribute='summary_fields') |
61
- selectattr('organization', 'undefined') | list | length > 0) else []
62
- }}
56
+ loop : " {{ (teams_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
57
+ map(attribute='organization') | map(attribute='name') | list | unique) +
58
+ ([organization] if ((teams_lookvar | map(attribute='summary_fields') |
59
+ selectattr('organization', 'undefined') | list) | length > 0) else [])
60
+ }}"
63
61
loop_control :
64
62
loop_var : needed_path
65
63
label : " {{ __path }}"
Original file line number Diff line number Diff line change 90
90
mode : ' 0755'
91
91
vars :
92
92
__path : " {{ output_path }}/{{ needed_path | regex_replace('/', '_') }}/workflow_job_templates/"
93
- loop : >-
94
- {{ (workflow_job_templates_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
95
- map(attribute='organization') | map(attribute='name') | list | flatten | unique) +
96
- ([organization] if ((workflow_job_templates_lookvar | map(attribute='summary_fields') |
97
- selectattr('organization', 'undefined') | list | flatten) | length > 0) else [])
98
- }}
93
+ loop : " {{ (workflow_job_templates_lookvar | map(attribute='summary_fields') | selectattr('organization', 'defined') |
94
+ map(attribute='organization') | map(attribute='name') | list | flatten | unique) +
95
+ ([organization] if ((workflow_job_templates_lookvar | map(attribute='summary_fields') |
96
+ selectattr('organization', 'undefined') | list | flatten) | length > 0) else [])
97
+ }}"
99
98
loop_control :
100
99
loop_var : needed_path
101
100
label : " {{ __path }}"
You can’t perform that action at this time.
0 commit comments