results
> debug: msg=" {{ result }}"
> vars_files:
> - answerfile.yml
try something like:
- hosts: esx
tasks:
- name: foo
bar:
baz: blah
delegate_to: localhost
Then the task should be run once for each host, but always on localhost.
Se
gt;
> - name: Ansible fact - ansible_date_time
> shell: date.sh
> ^ here
>
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: In
On 14.08.19 04:49, 舒何伟 wrote:
> " See the log for details
> (C:\ProgramData\chocolatey\logs\chocolatey.log).",
What does the log say?
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://
Hi Steven,
On 13.08.19 22:34, Steven Mething wrote:
> How do I fault find such an issue?
>
Ansible doesn't do sudo su -. It does sudo python
/ANSIBLETMP/CURRENTTASK.py or something like that.
Can you show us your sudoers config?
Sebastian
--
Sebastian Meyer
Linux Consultant & Tr
w how to get my first line and make it a variable in my 1st file
>
See:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#defining-variables-in-files
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldst
rwise you might want to look at setting a
different variable and merge them using set_fact and the combine jinja
filter.
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehn
r loop to skip all remaining items on that task on that
host once an error has occured you can use my second example. If you add
any_errors_fatal all hosts won't execute any other tasks.
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfe
TASK [foobar : include_tasks]
skipping: [localhost]
TASK [foobar : debug]
ok: [localhost] => {
"msg": "End"
}
PLAY RECAP [...]
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 System
s": ["mkdir:
cannot create directory ‘/tmp/foo/baz/bar’: No such file or directory"],
"stdout": "", "stdout_lines": []}
skipping: [localhost] => (item=/tmp/foo/bar/baz)
skipping: [localhost] => (item=/tmp/foo/abc)
PLAY RECAP **
> and it went successfully. Now i want to remove the resources what order i
> should follow:
> I tried 1 task and it is success
> 1. delete SG rule
>
> after that i am getting stuck because anything i try to delete , it has
> association with some other resource.
>
> Help me
t remove a network, if theres
still an instance on it.
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
-- Deutsche OpenStack T
iven by openstacksdk, which means that values
can come from a yaml config file in /etc/ansible/openstack.yaml,
/etc/openstack/clouds.yaml or ~/.config/openstack/clouds.yaml
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 8
rectory structure like this:
ansible/
common/roles/
app1/roles/
app2/roles/
and in the app folders each an ansible.cfg with:
roles_path: ./roles:../common/roles
[0]
https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-roles-path
--
Sebastian Meyer
Linux Consu
meout
changed_when: false
- name: Set nvme.io_timeout value
shell: "echo {{ nvme_target_timeout }} >
/sys/module/nvme_core/parameters/io_timeout"
when: nvme_current_timeout.stdout|int != nvme_target_timeout|int
Regards,
Sebastian
--
Sebastian Meyer
Linux Consul
SE Leap 42.3"
56 packages to upgrade, 6 new.
Overall download size: 27.8 MiB. Already cached: 0 B. After the operation,
additional 12.4 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
Regards
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems G
e csvfile lookup.
https://docs.ansible.com/ansible/latest/plugins/lookup/csvfile.html
Regards
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz:
) }}"
tasks:
- debug:
var: city
HTH,
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
--
You received
simpler/better :)
Sebastian
>
> But it return error:
>
>
> FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict
> object' has no attribute 'examples'"}.
>
>
> I read something about default can use only 1 level deep, bu
On 03.05.19 11:38, op...@netexpress.de wrote:
> -name: postfix - set debconf defaults before postfix install
You are missing a space here between the hyphen and name.
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7
ding on the exact syntax
>> problem.\n\nThe offending line appears to be:\n\n\n - debug:\n
>> ^ here\n"}
>>
>> What I do?
>
>
> Hi,
>
> Try with disk_facts.guest_disk_facts[1]instead...
disk_facts.guest_disk_facts.1 and disk_facts.guest_disk_facts[1]
both
8.5-36)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> import compose
>>>>> exit()
>> [ameyer@awx01 ~]$
>>
>>
>>
>> On Tuesday, April 9, 2019 at 4:09:
is and it didn't work.
>
> "{{ Regvar.stdout_lines | last }}"
Try
{{ regvar.stdout_lines[-1] }}
>
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unterne
t 12 2017, 15:50:02) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import compose
>>>
I noticed you executed the installer playbook with root. Could you check
pip and ansible_python_versi
e maintained after
> that date. A future version of pip will drop support for Python 2.7.
> docker-compose==1.22.0
> docker-py==1.10.6
> docker-pycreds==0.4.0
> dockerpty==0.4.1
>
>
> I'm not sure why this is not working. I am running this against the
> localhost.
&g
ansible/latest/user_guide/playbooks_delegation.html#rolling-update-batch-size
Use `serial: 1`
HTH,
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz:
work around this issue ?
You need to set gather_facts to no. gather_facts uses the setup module,
which is Python.
- hosts: servers
gather_facts: no
tasks:
[...]
Sebastian
>
>
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeld
y afterwards the results are merged.
Sebastian
>
>
> On Wednesday, April 3, 2019 at 8:01:59 PM UTC+5:30, Sebastian Meyer wrote:
>>
>> On 03.04.19 16:22, Kunalsing Thakur wrote:
>>> ---
>>> - name: Logging into pulp
>>> shell: pulp-admin logi
th_items: "{{ rpmname | default([]) }}"
> register: pulp
> when: rpmsearch is defined
You are using register with a loop. That means pulp.results is a list
and there's an element for each item in that list.
You can access the stdout for the first item with pulp.results.0.stdout
On 02.04.19 19:50, Jon Adcock wrote:
>that: getent_group.wheel|default(["", "", ""])[2] == ""
You'll need () around the getent and default:
that: (getent_group.wheel|default(["", "", ""]))[2] == ""
The ab
user
>
> become: yes
>
> become_user: root
>
> tasks:
>
> - name: run yum update -y using yum module
>
> yum:
>
> name: "*"
>
> state: latest
>
> Thank You much for any help
>
--
Sebastian Meyer
Linux C
ngle python process goes
up to 12.5GB before settling at 9.7GB.
So you might not have enough RAM on the system you're slurping the
file from.
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b
allowed to execute this script
with sudo and not use sudo for ALL, then you are right to use
command: sudo /usr/local/bin/application_stop_start.sh stop
You may want to add
warn: no
See:
https://docs.ansible.com/ansible/latest/modules/command_module.html?highlight=warn
Sebastian
--
Sebastian Mey
;> Hi,
>>
>> Dont see any documentation regarding adding static routes using nmcli
>> modules. Is it feasible to add static routes, if yes please let me know and
>> sample example would help.
>>
>
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me..
suggestions?
> Thanks.
You still need `become: true`, since you want to _become_ root executing
this script. Just setting the become_method to sudo won't do anything.
Sebastian
>
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7
{ base_pkgs + additional_pkgs | default([]) }}"
Ansible wants a flat list here. The suggestion in the deprecation
warning thinks both are just normal values and wants you to put them
into a list.
But if you already have lists, merge them with + as in the above code.
HTH,
Sebastian
--
Sebast
ing the system libselinux-python.
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
--
You received this message beca
"TaniumClient-6.0.314.1442-1.rhe7.x86_64"
> ]
> },
>
>
> but
>
> - debug:
> msg: "{{ pkg.results.stdout }}"
>
> fails. Seems like I should be able to print that.
You could print {{ pkg.results.0.std
orin
>>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups
>>>>> "Ansible Project" group.
>>>>> To unsubscribe from this group and stop receiving emai
- Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
--
You received this message because you are subscribed to t
as the command linux
> scp -rp
Not via a module. You'll need to use command for that.
- Sebastian
>
> Thanks community ansible !! ;)
>
> Regards,
>
--
Sebastian Meyer
Linux Consultant & Trainer
Tel.: +49-172-2057471
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterf
error that "Group "" does not exist".
>
> If I try
>
> group: "{{item.group if item.group is defined else item.username }}"
>
> then Ansible fails with the group does not exist.
>
> Whereas the default without specifying is that it creates it
;,
>> "subnet_id": "subnet-",
>> "vpc_id": "vpc-x"
>> }
>> ],
>> "placement": {
>> &qu
g in the docs, it's fixed in the devel docs:
https://docs.ansible.com/ansible/devel/modules/user_module.html
- Sebastian
>
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmen
t;: "xx.xxx.44.51",
> "root_device_name": "/dev/xvda",
[...]
> }
> ]
> }
> }
>
>
> i want to use debug option in playbook to print only the public ip
>
> ec2.instances.public_ip is not working
instanc
did not specify a user there). If that user is different from the one
you use for ansible, then the key can't be used.
- Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph
n a
playbook:
{{ ansible_facts['disks'][0]['size'] }}
- Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
--
You recei
is, if normal ssh works as
expected.
> - ansible.cfg
You should not need to specify anything here. If you need to keep your
ssh_config in a location the systems SSH client wouldn't look for it,
you probably could add a
-F /path/to/your/ssh/config
to the ssh_args parameter.
HTH
Sebastian
--
Sebas
the node currently running the task.
If you want to delete a line starting with the name of the node you'll
need '^{{ ansible_hostname }}', without the $ which means line end.
If you are getting an error, providing the error message would help ...
Regards
--
Sebastian Meyer
Linux Consultant &
2 : ok=1changed=0 unreachable=0failed=0
Hope that helps,
Sebastian
--
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,
49 matches
Mail list logo