first commit
This commit is contained in:
22
roles/awx_import-hosts-from-list/tasks/main.yml
Normal file
22
roles/awx_import-hosts-from-list/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
# tasks file for awx_import-hosts-from-list
|
||||
- name: create list
|
||||
set_fact:
|
||||
namen: []
|
||||
|
||||
- name: add hosts to list
|
||||
set_fact:
|
||||
namen: "{{ aruba_devices | split('\n') }}"
|
||||
|
||||
- name:
|
||||
debug:
|
||||
var: namen
|
||||
- name: make host group from survey hosts list
|
||||
add_host:
|
||||
hostname: "{{ item }}"
|
||||
groups: aruba_hosts
|
||||
ansible_user: sys-switchupgrade
|
||||
ansible_password: "{{aruba_pass}}"
|
||||
ansible_network_os: arubanetworks.aos_switch.arubaoss
|
||||
with_items: "{{namen}}"
|
||||
no_log: true
|
||||
Reference in New Issue
Block a user