Re: [ansible-project] Re: Pull of List in a Variable File as Extra-Vars

2022-08-05 Thread wpgpo...@gmail.com
Hello Vladimir, It does works successfully. Many thanks and highly appreciated. This thread is RESOLVED. Thanks... WP On Thursday, August 4, 2022 at 7:35:34 PM UTC-5 vbo...@gmail.com wrote: > > On Wednesday, August 3, 2022 at 5:02:16 PM UTC-4 wpgpo...@gmail.com > wrote: > > > *general_var.yml

Re: [ansible-project] Re: Pull of List in a Variable File as Extra-Vars

2022-08-04 Thread Vladimir Botka
> On Wednesday, August 3, 2022 at 5:02:16 PM UTC-4 wpgpo...@gmail.com wrote: > > *general_var.yml* > > main_dir: "{{ app_name }}-{{ ansible_hostname }}-{{ ver }}" Use *vars* lookup plugin to indirectly reference the value of the variable stored in *app_name*. Then use filter *product* to create th

[ansible-project] Re: Pull of List in a Variable File as Extra-Vars

2022-08-04 Thread wpgpo...@gmail.com
Thank you Walter... Honestly, I have no idea and trying to understand and learning it now. I'll get back once I have tried again. Thank you and appreciated... WP On Thursday, August 4, 2022 at 1:14:51 PM UTC-5 walte...@nist.gov wrote: > > https://docs.ansible.com/ansible/latest/reference_appendi

[ansible-project] Re: Pull of List in a Variable File as Extra-Vars

2022-08-04 Thread 'Walter Rowe' via Ansible Project
https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html Look for ansible_limit ... On Thursday, August 4, 2022 at 2:11:35 PM UTC-4 Walter Rowe wrote: > Are you thinking there is different "dir_list" for each group? > > --limit awssxb would also need an awssbx vars fil

[ansible-project] Re: Pull of List in a Variable File as Extra-Vars

2022-08-04 Thread 'Walter Rowe' via Ansible Project
Are you thinking there is different "dir_list" for each group? --limit awssxb would also need an awssbx vars file that has one list of values for dir_list --limt awssbx2 would also need an awssbx2 vars file that has a different list of values for dir_list? In your playbook you can reference var

[ansible-project] Re: Pull of List in a Variable File as Extra-Vars

2022-08-04 Thread wpgpo...@gmail.com
Hello, I have tried something like this one... Btw, I've been using group_vars already for my other variables. *dir tree:* - inventory - inv_test_01 (file) - group_vars (dir) - awssbx (file) * inv_test_01 (file) * [awssbx] awssandbox001.us.com [awsdev] awsdev001 awsdev002 * awssbx (f

[ansible-project] Re: Pull of List in a Variable File as Extra-Vars

2022-08-04 Thread 'Walter Rowe' via Ansible Project
You can group your inventory and provide the group name to the execution and it will only run on that group. $ ansible-playbook --inventory *my_inventory_file* --limit *group_name* ... rest of your command ... The "*hosts: all*" in your playbook will be limited to the group from your inventory

[ansible-project] Re: Pull of List in a Variable File as Extra-Vars

2022-08-04 Thread wpgpo...@gmail.com
Thank You, Walter. It does work as expected however, I do have couple of variables inside the dirname.yml and different directories inside of the home path. The idea, I don't want to run the copy module (etc) in one execution but instead putting them in a group or set. Another purpose, I don't wa

[ansible-project] Re: Pull of List in a Variable File as Extra-Vars

2022-08-04 Thread 'Walter Rowe' via Ansible Project
See if this does what you want .. - name: Test Playbook Script for Debug hosts: localhost vars_files: - general_var.yml - dirname.yml - patch_file.yml tasks: - name: Copy | All Mule v392 Patch to LIB-User Directory for "{{Application_Runtime | upper}}" Runtime copy:

[ansible-project] Re: Pull of List in a Variable File as Extra-Vars

2022-08-04 Thread wpgpo...@gmail.com
Yeah, I forgot to mention the result. Basically, there was no error but instead it creates a new directory from the value of 'app_name' rather than the item list of the dir_list. *Result:* /home/*dir_list*-awssandbox001.us.com-123/lib/user *Expected:* - /home/*hello*-awssandbox001.us.com-123/l

[ansible-project] Re: Pull of List in a Variable File as Extra-Vars

2022-08-04 Thread 'Walter Rowe' via Ansible Project
Are you getting an error? Can we see it? -- Walter Rowe, Chief Infrastructure Services Office of Information Systems Management National Institute of Standards and Technology United States Department of Commerce On Wednesday, August 3, 2022 at 5:02:16 PM UTC-4 wpgpo...@gmail.com wrote: > Hello Te