I believe you can find that here:
https://www.redhat.com/en/services/training/do407-automation-ansible
--
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 creates an implicit localhost when it is used, but not defined in
inventory. The implicit localhost sets connection to 'local', among other
things.
When you define localhost, it inherits the default connection type
('smart/ssh' unless you changed config), so you need to either define the
Not an installation issue, its indentation and task definition issues.
The - indicates item, in this case a task, but task items must be indented
inside a task: or as part of a role.
The other issue is that a task requires an action, name is a property of a
task and should always be in the same
Hi Stijn:
For the host argument use the following syntax: host: "{{
inventory_hostname }}"
That will replace the value for host based on the node defined in inventory.
For the using the env var you need to set that in your shell environment,
not the inventory file. If you want to keep the
What version of Ansible are you running?
On Wed, Jan 18, 2017 at 4:05 PM, Mohamed Lrhazi wrote:
> Hello,
>
> am trying ansible and ios_command module for the first time... it seems as
> if ansible is trying to execute normal unix commands instead of ios... what
> am I missing?
Hi,
The shell variables set in the setWLSEnv.sh are not persisted between
ansible tasks. You can try execute both scripts in the same shell:
- shell: source /setWLSEnv.sh && java weblogic.WLST {{ python file }}
Regards,
Rui Alves
On Tuesday, January 17, 2017 at 9:06:34 PM UTC, Anand Dasari
I'm using ec2.py dynamic inventory successfully with limiting by *multiple
tags*, but my need is to be able to limit by a tag where *one* of the
compound values matches, but I haven't found a way to do so yet.
Example: Tag = Apps Compound value = app1|app2|app3|app4
I'm kicking this off
Hello,
am trying ansible and ios_command module for the first time... it seems as
if ansible is trying to execute normal unix commands instead of ios... what
am I missing?
➜ cisco cat pb.yaml
---
- hosts: ios
gather_facts: no
connection: local
tasks:
- name: RUN 'SHOW VERSION'
I'm trying to get around the issue with authorized_keys not having support
for exclusive and with_items. I have a list of keys I want to populate an
authorized_keys file and have ansible remove all others that may be in the
file.
authorized_keys accepts a list of keys if they are supplied as a
Hey everyone,
I'm giving Ansible a try and I'm quite impressed.
I have a couple of questions regarding the ios_config module.
---
- name: Configure ACL
hosts: routers
gather_facts: false
connection: local
tasks:
- name: load new acl into device
ios_config:
host:
*Playbook:*
---
- name:
hosts: linux
tasks:
- name: Ensure host is logged into dockerhub
become: true
docker_login:
username:
password:
email:
*Hosts pip output:*
pip freeze | grep docker
docker==2.0.1
docker-compose==1.10.0
Hello,
Is there anyone in India who can provide ansible training.
--
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
Hi Everyone. I am a complete noob to this so please be patient with me.
I'm trying to learn Devops and my mentor asked me to research and attempt
to get a vagrant machine online with a LEMP stack using only ansible to
configure the machine. I am completely confused where to start with this.
Hi all,
Can anyone explain why targeting localhost explicitly instead of defaulting
to localhost behaves differently?
Cheers,
Stefan
--
☁ deploy [master] ⚡ cat deploy_ping.yaml
- hosts: localhost
gather_facts: false
max_fail_percentage: 0
strategy: free
tasks:
-
Hi there,
say I get a new instance somewhere that allows logins as root. I want
to run a playbook that configures the machine and no longer allows
root logins. And I want it to be idempotent. ;-)
Consider this mock-up playbook:
- hosts: foobar
vars:
ansible_user: root
On 18.01.17 13:46 sgamp...@criterionnetworks.com wrote:
> This 'ok' means 'onos-karaf', When I execute 'ok
> clean' in my remote VM which is having onos installed in it. I
There is your problem. I guess you have some kind of alias in your VM
that lets you use ok without errors.
Ansible does not
Do we have any module in ansible that we can use to add users and groups to
AD.
--
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
Hi
Im tryin to execute "c:\my files\a.bat"
which call : "c:\my files\c.bat"
i did try using the raw module like:
raw: "cd \"c:\my-files\" & \"c:\my-files\a.bat\""
but ansible refuse to pipe the sign &
also tried with \"&\" but then error appears
how can i cd to a relevant directory and then
Thank you, Kai! Works fine now.
On Wednesday, January 18, 2017 at 9:12:27 AM UTC-5, Dimitri Yioulos wrote:
>
> Hello, all.
>
> A while ago, I created a quck-'n-dirty user creation playbook. With the
> following line, I was able to both create the user, and his/her encrypted
> password (for
On 18. jan. 2017 15:12, Dimitri Yioulos wrote:
tasks:
- name: create user in Centos 6
user: name={{ user }} password={{ '{{ password
}}'|password_hash('sha512', 'ies8Aech') }} state=present
With the above, while the user is created, the password doesn't work. Help
would be appreciated.
Depends on what they are adjacent to, inventory or play. If you only use
one the distinction is mostly irrelevant.
--
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
Hello, all.
A while ago, I created a quck-'n-dirty user creation playbook. With the
following line, I was able to both create the user, and his/her encrypted
password (for CentOS 6/7):
user: name="someuser" password={{ 'somepassword'|password_hash('sha512',
'mSFRM"N4') }} state=present
Now,
The following document
http://docs.ansible.com/ansible/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable
states that inventory group_vars have lower precedence than playbook
group_vars.
But I have just one group_vars directory in my installation. When I put
anything
Hi Johannes,
This 'ok' means 'onos-karaf', When I execute 'ok clean' in my
remote VM which is having onos installed in it. It used to run clean up
Job and runs the new session of onos. In short it used to run onos
controller installed in remote machine. Please consider this example
Hello
The ansible 2.2.1.0-1 running on Rhel6/CentOS6 leads to error for existing
playbooks with roles applied conditionally.
The fix is available in the stable-2.2 branch (and others)
We have numerous playbooks based on the conditional role execution
When can we expect a 2.2.1.0-2 version -
Hi there,
On 18.01.17 12:49 sgamp...@criterionnetworks.com wrote:
> tasks: - name: running ok clean command: ok clean
What kind of command is 'ok'? Is this your actual executable? In your
previous examples I assumed it was called 'onos'.
> "[Errno 2] No such file or directory", "rc": 2}
Your
Hi Johannes,
As you can see in latest post I ran playbooks by adding quotes in it,
But still I getting error. Do you have any idea why I am getting this
error ? Is that I am missing something ?
- shubham
On Tuesday, January 17, 2017 at 4:07:35 PM UTC+5:30,
Brian,
Thanks for your help. It works. Much appreciated.
---
On Monday, January 16, 2017 at 11:51:33 AM UTC-5, Reji wrote:
>
> I am using Ansible 2.2 and I am running into issues when using the "find"
> module. My intention is to check for a pattern in a remote host file.
>
Yes Dick,
I tried that way as well still I am getting same error as you can
see my playbook
playbook:
---
- hosts: atrium
gather_facts: no
tasks:
- name: running ok clean
command: ok clean
chdir=/home/admin/onos
warn=no
register: result
- debug:
Hi,
Using given callback I'm able to log events from ansible to
logstash/elastic search. But can't search ansible_result field because it
represent field as string, for instance:
"{"changed":"false", "msg":"some message"}".
In ELK I'm trying to get format like this one
"ansible_result":{
On 13.01.17 11:43 davidfof wrote:
> ansible-playbook --limit windows -i hosts --extra-vars
> "ansible_user=my_username ansible_password=my_password" site.yaml
> - include: task_for_other_windows_user.yml vars: ansible_user:
> "{{other_windows_user_name}}" ansible_password:
>
On 17.01.17 09:42 Mátyás Kovács wrote:
> I hope you can help me with this problem. There are 50 different
> servers, each of them has different iptables firewall and rules. I
> want them to be managed by Ansible. My idea is to create a csv
> file, like this:
Have a look at
On 18.01.17 09:34 Dick Visser wrote:
> You can define environment variables for a task:
> http://docs.ansible.com/ansible/playbooks_environment.html
>
> If that setWLSEnv.sh contains many vars then store all of them in
> one ansible var for easy reuse and less clutter.
I would suggest setting
On 18.01.17 09:17 Dick Visser wrote:
> You seem to be specifying a parameter as the command?
> As per examples specify the actual command first, and then put the
> parameters after that.
> Preferably on different lines to make it more readable.
Also, as soon as spaces are involved, trying to
On 17.01.2017 09:42, Mátyás Kovács wrote:
Hi All,
I hope you can help me with this problem.
There are 50 different servers, each of them has different iptables
firewall and rules. I want them to be managed by Ansible. My idea is to
create a csv file, like this:
I highly recommend against a
Each task has its own environment, so what your setting by running a shell
script is lost afterwards, hence your error.
You can define environment variables for a task:
http://docs.ansible.com/ansible/playbooks_environment.html
If that setWLSEnv.sh contains many vars then store all of them in
You seem to be specifying a parameter as the command?
As per examples specify the actual command first, and then put the
parameters after that.
Preferably on different lines to make it more readable.
http://docs.ansible.com/ansible/command_module.html#examples
Dick
On Tue, 17 Jan 2017 at
37 matches
Mail list logo