22 lines
573 B
YAML
22 lines
573 B
YAML
---
|
|
# 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 |