Indeed.
I've noticed quite a few people are frantically trying to shoehorn shell
commands into ansible. This works yes but lacks all the goodies that
ansible brings such as idempotency etc.
The questions then tend to narrow down to why the output of a dozen twelve
cat/grep/sed/awk pipes doesn't
I would use a template , you can use the registered results in a for
loop inside jinja2.
--
--
Brian Coca
--
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
Thank you James! I'll try that tomorrow!
Have a good day
--
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...@googlegroups.com.
To
Hmm, no replies. Damn.
Here's my solution, in case anyone else has a similar problem.
I realised I can skip the approach of writing to disk, and keep it all in
memory.
So I have a task run by all 'lambda' hosts, which is:
set_fact:
this_host_vars: "{{ hostvars[inventory_hostname] |
Quad Zero,
You didn't even indicate if you tried using the module JYL took the time to
point out to you. There are examples there and everything. If you want
pre-written Ansible code without doing any research or leg work you should
look on galaxy.ansible.com.
And that is really weak criticizing
Neha,
This is amazing! Thank you so much for your reply and the time you took to
actually run it for me.
Stay awesome as you are Neha :)
On Wednesday, May 6, 2020 at 7:35:45 AM UTC-4, Neha Pithadiya wrote:
>
> I tried locally on my setup and faced same issue.
>
> seems this rpm command uses
Thanks for your reply but really is not helpful bud.
This is like if i asked how i can get to a destination, you are telling me
to go to a train or bus station.
On Wednesday, May 6, 2020 at 7:32:08 AM UTC-4, Jean-Yves LENHOF wrote:
>
> Hi,
>
> There's a module to import key, please use it !
>
On Wed, May 6, 2020, at 4:35 PM, Julien Seknazi wrote:
> Hi!
>
> I hope everything it's ok for you.
>
>
> I would like to know if it's possible to use mandatory "--limit" when you run
> :
> "ansible-playbook site.yml --limit DEVICE_1"
>
> I explain, if i don't use --limit, my playbook
Hi!
I hope everything it's ok for you.
I would like to know if it's possible to use mandatory "--limit" when you
run :
"ansible-playbook site.yml --limit DEVICE_1"
I explain, if i don't use --limit, my playbook will deploy on all my
devices.
Me, I want my playbook don't run if --limit
Has anyone gotten a fortinet/fortigate playbook to work? I have a
Fortigate 100D running 6.2.2 and I can't get it to pass an ansible ping.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving
I have a shell script that I'm trying to convert to Ansible. It currently
is similar to the following:
for uid in {1000..6500}
user = ipa user-find --uid=$uid --raw |grep uid: | awk '{print $2}'
echo "user,uid" >> uid.csv
do
How do I accomplish this in Ansible? I know I can use the shell
Hi,
first thing you should version all your playbooks and roles in a git
repository.
Then you tell Jenkins to pull such git repository and run the playbook you
want to.
Be sure that on the Jenkins host you have installed all the required
software: ansible, git.
You can create a Jenkinsfile at
it is missing an entry
plugin:
--
--
Brian Coca
--
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...@googlegroups.com.
To
Great! worked out thanks
On Wednesday, May 6, 2020 at 7:25:39 AM UTC-7, Brian Coca wrote:
>
> see ignore_unreachable
>
> https://docs.ansible.com/ansible/latest/reference_appendices/playbooks_keywords.html
>
>
> --
> --
> Brian Coca
>
>
--
You received this message because you are
odd problem...
I have an existing ansible project with yaml inventory and all works
perfectly.
In another directory I have a new project with different yaml inventory but
when I try to execute (using identical command syntax) I get:
[WARNING]: * Failed to parse .../inventory.yaml with auto
Hi Brian,
thanks a lot, that was indeed one part of the problem.
I also had to remove the meta: refresh_inventory at the end of the first
play.
WORKING VERSION
---
- name: "provision EC2"
hosts: localhost
connection: local
vars_files:
- vars/vars_infrastracture.yml
- vars/vars-ec2-ami-linux.yml
`ansible-api` is not something the Ansible project ships nor supports.
--
--
Brian Coca
--
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
see ignore_unreachable
https://docs.ansible.com/ansible/latest/reference_appendices/playbooks_keywords.html
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails
IT is something I've been trying to add
https://github.com/ansible/ansible/pull/58288
--
--
Brian Coca
--
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
this is just a variable named 'groupname'
groupname: launched
Per the docs
https://docs.ansible.com/ansible/latest/modules/add_host_module.html,
if you actually want to add it to the 'launched' group:
groups: launched
--
--
Brian Coca
--
You received this message because you
Hello,
When I start to lauch ansible-api, I have this issue :
root@VM-Ubuntu:~# ansible-api
Ansible API is running at Debug Mode
2020-05-06 16:18:06 | INFO - Ansible API Start... ( PID = 19629 )
2020-05-06 16:18:06 | ERROR - 'sign_key'
Traceback (most recent call last):
File
Look at the jump host example
https://docs.ansible.com/ansible/latest/reference_appendices/faq.html
On Wed, 6 May 2020 at 13:42, Gary Barber wrote:
> In my network I manage multiple customers on seperate networks. Many of
> which are owned by the customer.
>
> I want to use Ansible to manage
thanks Neha, Kai
I could fix the issue by using range with stdout.split(). Even, it is
working with stdout_lines as well
Once again thanks to all for helping me on this request.
Regards,
Suresh
On Wed, May 6, 2020 at 5:30 PM Neha Pithadiya
wrote:
> Can you paste the content of "volchk" list
Can you paste the content of "volchk" list .. Also try using
item.stdout_lines instead of item.stdout in your debug task.
On Wednesday, May 6, 2020 at 12:26:11 AM UTC+5:30, Suresh Karpurapu wrote:
>
> would anyone please help me on this request?
>
> Regards,
> Suresh
>
> On Tue, May 5, 2020 at
When u say "ansible stops if unreachable ", can you describe in detail what
is the problem or paste some screenshots ?
Neha
On Wednesday, May 6, 2020 at 10:54:25 AM UTC+5:30, Jimmy Malhan wrote:
>
> Ansible stops if unreachable, can it be ignored to continue the playbook?
>
> Thanks--
>
--
now i facing a new problem as the playbook is in inner directory and the
role is in the main dir
and it seams ansible don't see it
is there way to access the main roles dir ? ( the one under ansible dir )
On Wednesday, May 6, 2020 at 2:38:58 PM UTC+3, Meir Yanovich wrote:
>
> Thanks allot for
In my network I manage multiple customers on seperate networks. Many of
which are owned by the customer.
I want to use Ansible to manage servers in these networks from a single
managament network that has connectivity to all customer networks.
The problem is that some customer, due to owning
Thanks allot for your quick answers and help
On Wednesday, May 6, 2020 at 1:20:30 PM UTC+3, Meir Yanovich wrote:
>
> I try to include_rule but i keep getting errors on the wrong syntax
> this is my file structure :
>
>
> ├── roles
> │ └── utilities
> │ ├── defaults
>
I tried locally on my setup and faced same issue.
seems this rpm command uses shell , so you need to use "shell" module
instead of "command" module.
eg : shell: "rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*"
Results of execution:
changed: [localhost] => {
"changed": true,
"cmd":
Hi,
There's a module to import key, please use it !
https://docs.ansible.com/ansible/latest/modules/rpm_key_module.html
Regards,
JYL
Le 06/05/2020 à 12:17, Quad Zero a écrit :
Hi all,
Thank you for your help in my last post. I have come quite a way
(small compared to many of you) but
On 5/6/20 1:16 PM, Meir Yanovich wrote:
> Thanks its working, final question
> can i hold default values in the role ?
> so if no value is suplied in the include_role in the vars section it will use
> the default?
>
Sure, you could put the defaults into defaults/main.yml in your role or use
On Wed, 6 May 2020 03:20:30 -0700 (PDT)
Meir Yanovich wrote:
> ---
> - name: check if exsist
> hosts: localhost
> gather_facts: false
> tasks:
> - name: this is test
>include_role:
> static: no
> name: utilities
>
Thanks its working, final question
can i hold default values in the role ?
so if no value is suplied in the include_role in the vars section it will
use the default?
so that i could invoke :
- name: this is test
include_role:
name: utilities
tasks_from:
On 5/6/20 1:06 PM, Meir Yanovich wrote:
> i see ,
> in my vars: i will refer to those variable names ? not the module properties?
>
Your variable names in the vars block match the module properties, so the task
in the role should look like:
-name:d packa
get_url:
url_username: "{{
i see ,
in my vars: i will refer to those variable names ? not the module
properties?
On Wednesday, May 6, 2020 at 2:02:57 PM UTC+3, Stefan Hornburg (Racke)
wrote:
>
> On 5/6/20 12:57 PM, Meir Yanovich wrote:
> > Thanks for your fast replay , but now
> > when i set default values in the
On 5/6/20 12:57 PM, Meir Yanovich wrote:
> Thanks for your fast replay , but now
> when i set default values in the rules
> i do not want them to evaluate only from my include_rule I'm getting error:
> |
> -name:d packa
> get_url:
> url_username:temp
> url_password:tmp
> dest:tmp
>
Thanks for your fast replay , but now
when i set default values in the rules
i do not want them to evaluate only from my include_rule I'm getting error:
- name:d packa
get_url:
url_username: temp
url_password: tmp
dest: tmp
url: tmp
owner: tmp
group: tmp
running in
On 5/6/20 12:20 PM, Meir Yanovich wrote:
> I try to include_rule but i keep getting errors on the wrong syntax
> this is my file structure :
> |
>
>
> ├──roles
> │ └──utilities
> │ ├──defaults
> │ ├──files
> │ ├──handlers
> │ ├──meta
> │
I try to include_rule but i keep getting errors on the wrong syntax
this is my file structure :
├── roles
│ └── utilities
│ ├── defaults
│ ├── files
│ ├── handlers
│ ├── meta
│ ├── tasks
│ │ └── d_pack.yml
│ ├──
Hi all,
Thank you for your help in my last post. I have come quite a way (small
compared to many of you) but nevertheless making good progress each day.
I hit roadblocks quite a bit and thankfully google has helped me quite a
bit. I have come across this problem now which I hope some of you
Hi -
I have a basic dynamic inventory using the azure plugin:
```
plugin: azure_rm
include_vm_resource_groups:
- my_resource_group
```
However, this script runs in CI and teh resource group is created by a
previous step, so it is not static. What I really want to do is this:
```
plugin:
Hi Vladimir,
thanks for pointing out that mistake.
I fixed the role, but I still have the same behaviour.
You can find below the full example with the output.
PLAYBOOK
---
- name: "provision EC2"
hosts: localhost
connection: local
vars_files:
- vars/vars_infrastracture.yml
-
42 matches
Mail list logo