Hello Jordan,
That's exactly my problem! Now i understand why it's not on the second
play. I get the variable again on the second play and it's working properly.
Thanks a lot for the exaplanation!
David
On Tue, May 8, 2018, 22:00 Jordan Borean wrote:
> Without seeing the
It's confirmed, if you set a variable on a playbook, and add_host and make
new tasks, this variable is not "forwarded" to the next tasks
On Tuesday, May 8, 2018 at 5:04:03 PM UTC+2, David Villasmil wrote:
>
> Hello all,
>
> I've got a playbook that does:
>
> - n
hello all,
I run "ec2_instance_facts" to get some instance_ids:
- ec2_instance_facts:
region: us-east-1
filters:
"tag:Name": "*{{ cluster }}*"
register: ec2_res
Then i can properly print the instance_ids only for those running:
- name: print ips
debug: "msg={{ item.instance_id }}"
with_items:
Try with
var: "{{ var + item.pass }}"
Cheers
On Sat, May 12, 2018, 17:36 Ali Khawaja wrote:
> Hi Everyone,
>
>
>
> I am trying to read a dict from a file (list of user ids), and create
> another dict with key/value pairs (user ids with passwords). But once my
> script
Anyone able to help?
On Thursday, May 10, 2018 at 11:27:06 PM UTC+2, David Villasmil wrote:
>
> hello all,
>
> I run "ec2_instance_facts" to get some instance_ids:
>
> - ec2_instance_facts:
> region: us-east-1
> filters:
> "tag:Name": "*
ndented at the same level as ec2 task similar to the debug task
>
>
> On Thursday, May 10, 2018 at 2:27:06 PM UTC-7, David Villasmil wrote:
>>
>> hello all,
>>
>> I run "ec2_instance_facts" to get some instance_ids:
>>
>> - ec2_instance_facts:
Hello all,
I've got a playbook that does:
- name: Get db cluster endpoint
shell: "aws --region=us-east-1 rds describe-db-clusters
--db-cluster-identifier {{ cluster }}-kam-db"
register: aws_cluster_res
- set_fact:
myvar: "{{ aws_cluster_res.stdout | from_json }}"
- set_fact:
endpoint: "{{
Thanks for replying:
$ ansible-playbook --version
ansible-playbook 2.5.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/admin/.ansible/plugins/modules',
u'/usr/share/ansible/plugins/modules']
ansible python module location =
d and the "replace" task
> to see when it starts to "disappears"
>
> On Tuesday, May 8, 2018 at 8:04:03 AM UTC-7, David Villasmil wrote:
>>
>> Hello all,
>>
>> I've got a playbook that does:
>>
>> - name: Get db cluster endpoint
>&g
hello all,
After executing ec2 create, with "with_sequence", i need to retrieve each
instance's "id", "dns_name" and "tags"->"Name".
the response is as follows:
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r
/home/admin/.ansible/tmp/ansible-tmp-1525715943.61-189658929132615/ >
/dev/null 2>&1 && sleep
Please paste the code WITHOUT any formatting. Font should be any
single-space so that spacing is correct.
On Mon, May 21, 2018, 15:55 Jeremie Levy wrote:
> Hi
> I'm trying to do the following (in windows but it's not important):
>
>
>1. Need to deploy N number of build
I think if you set 'become' then you don't need to use sudo.
Also, why don't you use the module to install packages instead of executing
yum?
http://docs.ansible.com/ansible/latest/modules/yum_module.html
Example:
- name: install one specific version of Apache
yum:
name:
Solved!
- set_fact:
hosted_zone_id: "{{ dns_results |
json_query('HostedZones[?Name==`(lookup('vars',
hosted_zone_name)).`].[Id]') | regex_replace ('/hostedzone/', '') }}"
For future reference.
Thanks
David
On Wednesday, May 23, 2018 at 10:04:16 PM UTC+2, David Villa
Hello guys,
I've got this set_fact:
hosted_zone_id: "{{ dns_results |
json_query('HostedZones[?Name==`mydomain.com.`].[Id]') | regex_replace
('/hostedzone/', '') }}"
But i want to get the id from any of my domains, so i want to use a
variable:
hosted_zone_name: "mydomain.com"
and do
Nevermind, layer 8.. my mistake, i will open a new one
On Wednesday, May 23, 2018 at 8:39:24 PM UTC+2, David Villasmil wrote:
>
> Hello guys,
>
> I can use like:
>
> # >> Create the DNS load balancer to the instances
> - name: Creating DNS load balancer
> ro
Spoke too soon... That doesn't work either...
On Wednesday, May 23, 2018 at 10:04:16 PM UTC+2, David Villasmil wrote:
>
> Hello guys,
>
>
> I've got this set_fact:
>
> hosted_zone_id: "{{ dns_results |
> json_query('HostedZones[?Name==`mydomain.com.`].[Id]') | r
Hello guys, i'm trying to use a variable inside a variable.
https://pastebin.com/QmRX3jmz
lookup SHUOLD work but it doesn't... can anyone help?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop
Hello guys, i'm trying to use a variable inside a variable.
https://pastebin.com/bu5BuM4y
lookup SHUOLD work but it doesn't... can anyone help?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop
Hellos guys,
I have a result from ec2_instance_facts, and i can get the ip addresses
like:
- name: Get IP addresses from results
set_fact:
inject_ips: “{{ facts_output | json_query(‘instances[].
public_ip_address’) }}”
and that gives me something like:
ok: [localhost] => {
Hey Jordan,
Thanks for replying!
There were "`" missing, worked beautifully after that!
- set_fact:
hosted_zone_id: "{{ dns_results | json_query('HostedZones[?Name==`' ~
hosted_zone_name ~ '.`].[Id]') | regex_replace('/hostedzone/', '') }}"
"~" escapes it, so there's no need to do a
Hello Guys,
So, i have a vars file with something like this:
---
aws_740:
AWS_ACCESS_KEY_ID: "MY_KEY"
AWS_SECRET_ACCESS_KEY: "MY_SECRET"
AWS_DEFAULT_REGION: us-east-1
aws_756:
AWS_ACCESS_KEY_ID: "MY_KEY"
AWS_SECRET_ACCESS_KEY: "MY_SECRET"
AWS_DEFAULT_REGION: us-east-1
And I want
Hello guys,
I can use like:
# >> Create the DNS load balancer to the instances
- name: Creating DNS load balancer
route53:
command: create
zone: "{{ domain }}"
value: "{{ cluster }}-{{ item }}.{{ domain }}"
alias: true
alias_hosted_zone_id: "KLAIUDIAUHSINUD"
You can use ec2_tags.
On Sun, May 27, 2018, 13:16 Ali Khawaja wrote:
> Hi,
>
> is there a way in ansible to set the name of the windows host when we are
> creating the ec2 instance or maybe change it afterwards?
>
> Thanks
> Ali
>
> --
> You received this message because you
Remove all formatting please
On Sun, May 27, 2018, 11:28 wrote:
> what i have realized is that on ec2 retrieval, the output is a json
> object, whereas on ec2 creation, the output is json but in a string
> format. is this understanding correct? do i need to convert the
24 matches
Mail list logo