on-internet
← Community

getting "skipping: no hosts matched" with ansible playbook

Stack Overflow ·

my below ansible (2.1.1.0) playbook is throwing "skipping: no hosts matched" error when playing for host [ec2-test]. The ansible hosts file has the fqdn of the newly created instance added. It runs fine if if i re run my playbook second time. but 1st time running throws no hosts matched error :( my playbook: --- - name: Provision an EC2 instance hosts: localhost connection: local gather_facts: no become: False vars_files: - awsdetails.yml tasks: - name: Launch the new EC2 Instance ec2: aws_access_key: "{{ aws_id }}" aws_secret_key: "{{ aws_key }}" group_id: "{{ security_group_id }}" instance_t

Comments

Sign in or sign up to comment and upvote.

No comments yet.