Hi,
I'm a beginner on awx and ansible.
I have a template with RHEL7 on vmware and I trying to clone a vm and
register on rhn.
My playbook create vm without issue and take all parameters from survey on
awx, but I have a doubt how to register on RHN?
In my template there is already linux user ansible with ssh rsa public key
in authorized_hosts, so my ansible can access without problems.
How to execute the task on new created host and not localhost?
---
- name: Create a VM from a template
hosts: localhost
connection: local
gather_facts: no
tasks:
- name: Clone the template
vmware_guest:
hostname: '{{ vcenter_server }}'
username: '{{ vcenter_user }}'
password: '{{ vcenter_password }}'
validate_certs: False
name: '{{
template: Template_RHEL7
datacenter: '{{ vcenter_datacenter }}'
folder: /
state: poweredon
wait_for_ip_address: yes
- name: Register RHN
rhn_register:
state: present
username: joe_user
password: somepass
Thank you for your suggestions.
Enzo
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/7f58df65-1586-4745-9942-5caf40d6686e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.