Re: [ansible-project] How to apply/run playbook target at a specific group of machines in the ini-style inventory

2021-10-16 Thread James Ngo
I actually figured it out, should use the -l -i ./inventory/hosts -l Windows Works like a charm! On Saturday, October 16, 2021 at 10:56:29 AM UTC-7 James Ngo wrote: > I have changed to "host: all" per your suggestion, it unfortunately did > not help... > It does not like the -i ./inventory/hos

Re: [ansible-project] How to apply/run playbook target at a specific group of machines in the ini-style inventory

2021-10-16 Thread James Ngo
I have changed to "host: all" per your suggestion, it unfortunately did not help... It does not like the -i ./inventory/hosts Windows But if I just do -i ./inventory/hosts (without the group "Windows"), it will work but it will do all the devices/machines instead of just a specific group (which

Re: [ansible-project] How to apply/run playbook target at a specific group of machines in the ini-style inventory

2021-10-16 Thread Dick Visser
That "*" is a bit unusual (to me at least). Try: hosts: all And then see if the issue is still there On Sat, 16 Oct 2021 at 19:27, James Ngo wrote: > Hi, > > Right, it maybe the playbook itself. Anyway, the play1.yml is per below: > > > - hosts: "*" > become: yes >

Re: [ansible-project] How to apply/run playbook target at a specific group of machines in the ini-style inventory

2021-10-16 Thread James Ngo
Hi, Right, it maybe the playbook itself. Anyway, the play1.yml is per below: - hosts: "*" become: yes tasks: - name: apt apt: update_cache: yes upgrade: 'yes' = If I run the play1.yml with the following command, witho

Re: [ansible-project] How to apply/run playbook target at a specific group of machines in the ini-style inventory

2021-10-16 Thread Dick Visser
Then the issue must in the playbook itself. What does that look like? On Sat, 16 Oct 2021 at 18:26, James Ngo wrote: > Hello everyone, > I am a pretty new face to Ansible. I can follow instruction pretty good > however, I need your help with the following scenario. > I created an .INI style inve

[ansible-project] How to apply/run playbook target at a specific group of machines in the ini-style inventory

2021-10-16 Thread James Ngo
Hello everyone, I am a pretty new face to Ansible. I can follow instruction pretty good however, I need your help with the following scenario. I created an .INI style inventory file called "hosts", with basically categorize our devices/servers in different groups like below +++ [