>
> Yeah that worked for a debugging scenario so awesome and thanks for that.
> Might you have any idea how to use those called variables to edit text
> files? Namely here is the bigger playbook I am trying within the proxy
> role. I am trying to have it change the name of the .conf file as well as
> manipulate text within the prod_proxy_conf.j2. It keeps stating that there
> is an undefined variable however any thoughts?
proxy role main.yml
- name: " Proxy | Setup Proxy"
template:
src: /etc/ansible/files/proxy_files/prod_proxy_conf.j2
dest: /etc/httpd/conf.d/ "{{ hostvars[item]['client_name'] }}".conf
with_items: "{{ groups['app'] }}"
- name: Proxy | Restart Proxy
command: apachectl graceful
- name: Clone template and customize
delegate_to: 127.0.0.1
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
folder: "NECO-App"
validate_certs: "false"
datacenter: "{{ vcenter_datacenter }}"
cluster: "{{ vcenter_cluster }}"
state: "poweredon"
name: "{{ inventory_hostname }}"
template: "{{ app_vsphere_template }}"
networks:
- name: "{{ app_network }}"
ip: "{{ server_ip }}"
netmask: "{{ servers_netmask }}"
gateway: "{{ app_gateway }}"
domain: "{{ app_domain }}"
dns_servers:
- "{{ dns_lookup }}"
wait_for_ip_address: yes
- name: add to in memory inventory
add_host:
hostname: "{{ item }}"
groups: new
with_items: "{{ groups.app }}"
tasks:
roles:
- { role: common }
- { role: create_instance }
- { role: setup_tpms }
- { role: upgrade_jboss }
- hosts: proxy
tasks:
roles:
- { role: proxy }
>
--
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/8d862b81-bfd3-402d-9615-0055a09a4b95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.