Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@ymlhost-3 ansible-yml]# cat cisco-play.yml
- ---
- - name: cisco-yml
- hosts: cisco
- gather_facts: no
- connection: local
- tasks:
- - name: obtain login credentials
- include_vars: secrets.yml
- - name: define provider
- set_fact:
- provider:
- host: "{{ inventory_hostname }}"
- username: "{{ creds['username'] }}"
- password: "{{ creds['password'] }}"
- auth_pass: "{{ creds['auth_pass'] }}"
- authorize: yes
- - name: Include all .yml
- include_vars:
- dir: 'tasks'
- extensions:
- - json
- - yml
- [root@ymlhost-3 ansible-yml]#
- [root@ymlhost-3 ansible-yml]# cat cisco-play.yml
- ---
- - name: cisco-yml
- hosts: cisco
- gather_facts: no
- connection: local
- tasks:
- - name: obtain login credentials
- include_vars: secrets.yml
- - name: define provider
- set_fact:
- provider:
- host: "{{ inventory_hostname }}"
- username: "{{ creds['username'] }}"
- password: "{{ creds['password'] }}"
- auth_pass: "{{ creds['auth_pass'] }}"
- authorize: yes
- - name: Include all .yml files except bastion.yml (2.3)
- include_vars:
- dir: 'vars'
- ignore_files: 'bastion.yml'
- extensions: ['yml']
- [root@ymlhost-3 ansible-yml]#
Add Comment
Please, Sign In to add comment