I am currently using dynamic inventory with ec2.ini set to use
private_dns_name & private_ip_address
However certain host in a different subnet are showing up as
ip-x.x.x.x.ec2-internal as opposed to just returning their private IP
(which they have). Does anyone have an idea why this is happen
Anyone using ansible vault to encrypt ssh private key? Seems like it will
always prompt for passphrase if the key file is encrypted.
If the key is not encrypted by vault then it works as is; ansible.cfg has
the configuration for the vault passphrase file. Also in my case the ssh
file does not h
Thanks!
Somehow I missed that vars (and IDE missed it as well..)
On Thursday, April 6, 2017 at 1:38:48 PM UTC-4, Kai Stian Olstad wrote:
>
> On 06. april 2017 19:32, Anthony Cheng wrote:
> > Are you sure that it actually works? It didn't when I tested it (looks
>
Are you sure that it actually works? It didn't when I tested it (looks
like order matters).
On Thursday, April 6, 2017 at 1:22:43 PM UTC-4, Kai Stian Olstad wrote:
>
> On 06. april 2017 18:57, Anthony Cheng wrote:
> > Is it possible to set variable before hosts in playbook?
&
Is it possible to set variable before hosts in playbook?
Something like this doesn't work:
var:
VARHOSTNAME: test
- hosts: "{{ VARHOSTNAME }}"
gather_facts: true
become: yes
I know I can set variable in vars file or pass in environment values at
command line but wanted to know if i can ju
Does anyone know how I would go about to register values into variable +
string (within a loop), so something like:
register: "{{ item }}"_LIST
with_items: "{{ LIST.stdout_lines }}"
or
register: {{ item }}_LIST
--
You received this message because you are subscribed to the Google Gr
I have been struggling to use the lookup for vars feature, specifically
tried something like:
vars:
BUCKET_LIST: "{{ lookup('file', 'test') }}"
vars:
BUCKET_LIST: "{{ lookup('file', 'test') |to_json }}"
Where test is basically just a flat text file, new line separated
What I want
FYI I figured it out that I needed to use with_item to parse the JSON.
On Thursday, September 22, 2016 at 2:26:10 PM UTC-4, Anthony Cheng wrote:
>
> I have a playbook that use the S3 module to list items:
>
> - name: List s3 bucket
> local_action:
>module: s3
>bucke
I have a playbook that use the S3 module to list items:
- name: List s3 bucket
local_action:
module: s3
bucket: "{{ S3_BUCKET_NAME }}"
mode: list
register: S3_LIST_ITEM
The result I output to a file using lineinfile:
name: Output to folder
local_action:
module: lineinfile
c
I have a playbook that use the S3 module to list items:
{code}
- name: List s3 bucket
local_action:
module: s3
bucket: "{{ S3_BUCKET_NAME }}"
mode: list
register: S3_LIST_ITEM
{code}
The result I output to a file using lineinfile:
{code}
name: Output to folder
local_action:
I think this is a bug (https://github.com/ansible/ansible/issues/16833)
where file lookup doesn't get sudo permission on localhost even with
become=true. In my testing, shell command on localhost requiring sudo
works fine with become=true.
--
You received this message because you are subscrib
Let's say if I got this ugly debug output (nested list?), how about would I
go to retrieve this value?
ok: [127.0.0.1] => {
"foo.stdout": [
[
[
"bar"
]
]
]
}
Tried:
with_items: "{{ foo.stdout }}"
with_items: "{{ foo.stdout[0] }
Try using debug -vvv and then manually run the command that fails; that
should give you some clues as to what kind of issue.
On Saturday, July 23, 2016 at 9:27:51 AM UTC-4, bar...@bossanova.com wrote:
>
> Hello all,
>
> I'm attempting to use the azure_rm functionality I appear to be having an
w only «all_instances = False» (by default) in ec2.ini, to exclude
> stopped.
> Unreachable hosts will be skipped by Ansible, but error messages will be
> displayed.
>
> On Tuesday, July 19, 2016 at 3:59:48 PM UTC+5, Anthony Cheng wrote:
>>
>> I want to use the ec2
I want to use the ec2_facts module to gather info, e.g.
- hosts: all
gather_facts: false
become: no
tasks:
- name: Get instance ec2 facts
action: ec2_facts
register: ec2_facts
Is there a way to filter out the SSH unreachable (maybe not on first run)
but maybe give them a specifi
gt; at the same version?
>
> ansible --version
> ansible-playbook --version
>
> Maybe there's some symlink spaghetti going on or something??
>
> If not, that sounds like a bug, I'd file an issue.
>
> On 7 July 2016 at 20:08, Anthony Cheng > wrote:
> >
To be more specific, ad-hoc command checks in ~/.ssh/authorized key whereas
playbook does not. I didn't specific any user in the playbook whereas I
try to run as root/ubuntu/none with ad-hoc (-u).
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" g
I noticed in troubleshooting SSH authentication that there is a difference
between ansible ad-hoc and ansible-playbook in terms of SSH for localhost.
Specifically, I was able to get a playbook targeted at localhost to work
but not ansible ad-hoc command targeted at localhost.
--
You received t
cs.ansible.com/ansible/playbooks_filters.html#random-number-filter
>
>
> On Tuesday, July 5, 2016 at 3:59:08 PM UTC+1, Anthony Cheng wrote:
>>
>> Looking over some ansible ec2 script I see reference to:
>>
>> "{{ vars|random }}"
>>
>> e.g.
>>
>> vpc
Looking over some ansible ec2 script I see reference to:
"{{ vars|random }}"
e.g.
vpc_subnet_id: "{{ ec2_subnet_id|random }}"
(http://allandenot.com/devops/2015/01/31/provisioning-ec2-hosts-with-ansible.html)
Does this randomly select the variable, if so why would anyone would to do
that?
-
ou are attempting to reach set up as the ip that ec2.py
> returns (x.x.x.x in your pasted output) in your ~/.ssh/config or as the
> devtest3 hostname you connected to in your SSH debug output?
> On Jun 22, 2016 9:31 AM, "Anthony Cheng" > wrote:
>
>> I am trying t
I am trying to access an EC2 instance with Ansible installed on another EC2
instance; my hosts are setup with a bastion host. I have been following
this post
http://blog.scottlowe.org/2015/12/24/running-ansible-through-ssh-bastion-host/
which seems fairly straight forward.
I can ssh directly
Here's ssh setting of the ansible.cfg:
[ssh_connection]
ssh_args = -F /root/.ssh/config -o ControlMaster=auto -o ControlPersist=10m
control_path = ~/.ssh/ansible-%%r@%%h:%%p
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from
I am trying to access an EC2 instance with Ansible installed on another EC2
instance; my hosts are setup with a bastion host. I have been following
this post
http://blog.scottlowe.org/2015/12/24/running-ansible-through-ssh-bastion-host/
which seems fairly straight forward.
I can ssh directly
New link is here http://docs.ansible.com/ansible/yum_repository_module.html
--
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 ansible-project+unsubscr...@google
The reason I am asking is because I made some modification in my playbook
/w vsphere_guest module; specifically the host and datastore location but I
find that when I run the playbook it is still using the previous host and
datastore setting.
--
You received this message because you are subscr
26 matches
Mail list logo