.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
To view this
.
If this was possible in 2.9, which it was not, it would have been a
major bug and security issue.
The 'working' example you show seems to get a full dictionary of the
parameters passed to the module via the 'endpoint' option, I don't see
any other way that would work.
--
--
Brian Coca
--
You
rmation.
Looks like typo in a shell command/script (meant `cat`?) or `ucat` is
not in the PATH
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving
advice.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
To view this
e terminal plugin).
--
------
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
To
into it.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
To view this
it is not really effective until the 'next play' as modifying the
current play's data is very problematic.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop
ls -l ~/.ansible/collections/ansible_collections/
total 20
lrwxrwxrwx 1 bcoca bcoca 54 Oct 7 2021 bcoca ->
/home/bcoca/work/collections/ansible_collections/bcoca
On Wed, Feb 22, 2023 at 3:45 PM Brian Coca wrote:
>
> symlinks do work, but you still need an ansible_collections/ dir
symlinks do work, but you still need an ansible_collections/ dir
before your collection
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails fro
sorry, wrong link before
https://docs.ansible.com/ansible/latest/dev_guide/developing_module_utilities.html
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop
unusable, hence the limitation to only
depend on code in module_utils/.
https://docs.ansible.com/ansible/latest/reference_appendices/module_utils.html
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To u
collection.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
To view this
--syntax-check playbook.yml `, for vars
files i would use `ansbile -m include_vars `, for roles `ansbile -m
import_role ...`
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this grou
Also, if the built in command does not do exactly what you want, you
are free to create your own custom version, it just not make sense for
this in the core offering.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Develo
side effects that you can track, but hard
to build them all into the command/shell modules (open port/service
running/package installed/etc) but there are plenty of other actions
that can query this.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google
Modules should not have direct access to vault secrets, but you can
provide them to module options via the unvault/vault filters: (last
ones in section)
https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#hashing-and-encrypting-strings-and-passwords
--
--
Brian Coca
It is possible, just not via the variable, do `import sys;
sys.version_info < (3, 0)`, since that will reflect the python the
script is running under.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
T
, but each
task/host has it's own fork.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@google
merge_list'
a_merge_list: [1,2,3]
b_merge_list: [4,5,6]
--
------
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to an
, but then this also limits us to python in many
respects and removes several abilities (changing
become/connection/interpreter settings per loop item, for example).
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development&q
use cases.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
To view this
Jinja2 has this already, macros
https://jinja.palletsprojects.com/en/2.10.x/templates/#macros
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving e
Actually I was already thinking of spliting _modify_module, for one, it
should not need/handle/know about become_kwargs and we should eliminate the
passing of these, which is kind of the opposite direction of your
proposal.
As for action plugins, they already do too much and have too much
Many ways, just an example:
- in a handler update a host_vars/.yml with the list of users
already synced, notify when sync tasks run/change
- add to sync role/block/tasks a conditional based on the variable
cdreated `when: username not in already_processed_users`
--
--
Brian Coca
.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web vi
you have `module_rejectlist`, but it requires `module_blacklist`
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
main dev guide
https://docs.ansible.com/ansible/latest/dev_guide/index.html
more communication channels (see network working group, they are most
likely to have better answers about this type of development )
https://docs.ansible.com/ansible/latest/community/communication.html
--
Brian Coca
The cliconf/network_cli plugins do this, they handle the connection
internally in the module and use ssh/paramiko/libssh to interact with
the target
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development&q
']
for the specific auth errors you can rescule
rescue:
- action: do stuff here
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, sen
confident that our record would speak against any perceived bias, as
long as you are willing to examine all the facts.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this grou
, with the ;mount + error message specific to each mount.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-deve
there, inject just adds the
ansible_mounts alias)
To find out what exactly is happening i recommend running fact
gathering directly on the targets that you see are missing
ansible_mounts (unless it is the 'inject' issue, which is controller
configuration).
--
--
Brian Coca
--
You received
I was not aware of the datetime bug (was thinking to_datetime &
strftime), but it is still simple to do in jinja:
- debug: msg='{{seconds}}'
vars:
d: "{{res['delta'].split(':')}}"
seconds : "{{ d[0]|int * 3600 + d[1]|int * 60 + d[2]|float }}"
--
You also have --limit , which avoids playbook rewrites and per run
custom inventories
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails fro
tasks do not use return codes, their status is reflected in the return
data dictionary as keys.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving e
Just added this for 2.12 (still not final)
https://github.com/ansible/ansible/pull/73707
Also see https://github.com/ansible/ansible/pull/74331
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To u
affect the controller by occupying the forks for
too long and delaying the play in general.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails fro
on the method/code used to
do the gathering, which can vary by platform, OS, distro, distro
version, etc. I have not found a good way to handle that yet.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To u
gather_facts
(normally still calls setup module)
- gather_facts supports configurable set of modules (network_os
resolution already built in)
- gather_facts can run multiple modules in parallel
--
--
Brian Coca
--
You received this message because you are subscribed to the Google
https://hitchdev.com/strictyaml/why/implicit-typing-removed/ <= its
the opposite of yours, but same issue
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and s
Depends, this can happen at many points and for diff reasons, in
general `|string` filter when you consume it ensures it is a string,
if it is happening at YAML boundry quote it or use !!str
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
op of 100 items.
>
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
T
Up to 2.9 there is no independent version of modules included in
Ansible, after 2.10 and moving into collections you can see the
'collection version' .. but no module version yet.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"An
Just to confirm, what Andreas describes is correct, any 'shared' code
must be in module_utils, modules cannot rely on other module's code as
ONLY the current module code (+ module_utils references) is shipped to
the remote.
--
--
Brian Coca
--
You received this message because you
Yes, here are the docs:
https://docs.ansible.com/ansible/latest/user_guide/vault.html#multiple-vault-passwords
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop
Something like this will sort the keys and use the last one.
- debug: msg={{ansible_lvm.vgs[(ansible_lvm.vgs.keys()|sorted|list)[-1]]}}
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubs
not a development question. Use ansible-project ML or go to #ansible
on freenode.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, sen
It needs a specific subdir for each plugin type, otherwise there would
be name conflicts across plugins.
See
https://docs.ansible.com/ansible/latest/dev_guide/developing_locally.html#local-plugins
--
--
Brian Coca
--
You received this message because you are subscribed
because ansible expects a single JSON document as a response on STDOUT
of the module .. if you do print statements .. you are probably
breaking that requirement, hence the error.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"An
client_data is not a var, its a module option, those are not the same
thing and are not supposed to be conflated. Options are populated FROM
vars via templating, they are not vars themselves.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
from this group and stop receiving emails from it, send an
> email to ansible-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-devel/7e095851-01b6-4a1c-b824-0df893cfbc8b%40googlegroups.com.
--
--
Brian Coca
--
You might want to try the aws working group
https://github.com/ansible/community/tree/master/group-aws, probably a
more focused audience to express interest on this.
The irc channel is most likely to get you a more immediate response.
--
--
Brian Coca
--
You received this message
defining the collector is not enough, you need to call it with all the
other collectors see 'default_collectors.py'
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this grou
You have access to host and group vars defined by previous inventory
sources, but the host_vars/group_vars files are not available, since
those are processed after all inventory is defined.
You could call the vars plugins directly but it is not something I advise.
--
--
Brian Coca
i don't think that is exclusive to zabbix and those using 'admin' as a
password deserve 'some weirdness' imho.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop
is is why feedback is important and we continue to listen, learn and
adapt, we would also benefit from more people attending the IRC meetings
where these things get proposed, voted on and
decided. https://github.com/ansible/community/tree/master/meetings
--
--
Brian Coca
--
You received th
if no_log could be bypassed and runtime, it would trigger a CVE ... so
the way to test the modules is to disable no_log in the module code
itself.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To u
the file lookup https://docs.ansible.com/ansible/latest/plugins/lookup/file.html
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, sen
fixed) and my poor wording of warnings and docs (which is
still being worked on).
--
------
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, sen
first, this conditional is wrong:
`when: "{{ ansible_architecture }} == 64-bit"`
should be:
`when: ansible_architecture == "64-bit"
alos you can just do:
src: "{{ (ansible_architecture == '32-bit')|ternary('phoenix_x86',
'phoenix_x64') }}"
--
-
Use the template action, it is almost always the right answer to the
question 'how do i generate a file'.
https://docs.ansible.com/ansible/latest/modules/template_module.html
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"An
I don' t know, it feels like you are trying to force a workflow
AGAINST the base design, at that point i would suggest a) change the
workflow or b) use a different tool that actually supports that
approach
--
--
Brian Coca
--
You received this message because you are subscribed
it
will only work if you purposefully avoid generating any variable
dynamically.
I would not say the API is unstable, just that it is not for public
consumption, so we make no guarantee that we won't change it tomorrow
to fit our needs.
--
--
Brian Coca
--
You received this message because you
in play, this gets unwieldly fast.
Strategies do have access to vars, but mainly focused on 'current task
+ host' , it is possible to expand that to ALL variables, but I don't
know why you want them again this can be huge and impose both RAM and
processing botlenecks.
--
Brian Coca
You probably need to set the remote user to an account that allows
login, one way would be `ansbile_user: the account`
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this grou
W/o a definition of what you mean by access, the answer is 'yes'.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ans
Also there is a bug with 'adjacent' directories for inventory plugins,
this should fix it https://github.com/ansible/ansible/pull/51177
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubs
no, modules can only return the data, they have no control on display,
that happens at the callback level.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop
Ansible does not have this feature, but specific modules do, for
example, the copy and template modules will show 'changed' if the file
had to be updated (not just content but permissions also), they will
also return 'diff' information (if requested, i.e --diff ).
--
Brian Coca
--
You
it really has it's own section
https://docs.ansible.com/ansible/latest/user_guide/playbooks_prompts.html
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiv
I would actually remove ansible_pass/ansible_ssh_password to avoid
accidental disclosures.
Why do you need this information in the play?
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubs
there is no need to register as the host failing the ping will be
removed from the play.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails fro
1 play before your normal play:
hosts: hosta,hostb
gather_facts: False
tasks:
- ping:
- group_by: key=rechable
hosts: reachable
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubs
or just add 'default' for when fact gathering runs:
PIP_INDEX_URL: "{{ 'https://mirrors.aliyun.com/pypi/simple' if
(ansible_domain|default('')).startswith('cn') else
'https://pypi.org/simple' }}"
--
------
Brian Coca
--
You received this message because you are subscribed to
not sure if this is what you want/need but aside from normal vars you
can also use 'stats'
https://docs.ansible.com/ansible/latest/modules/set_stats_module.html
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development&q
e, this in turn calls the connection
plugin method for file transfers.
If you don't want to use directly, look at the template action plugin,
it just calls the copy action plugin when it needs to copy the files,
you could do the same in this case.
--
Brian Coca
--
You received this message becau
It would help if you gave more information about what you are trying
to accomplish as implementations might vary depending on that.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from
and prompts as
they happen
Another is creating something like the telnet action plugin that will
handle the communication directly and allow you to send commands (its
mostly a specialized 'expect').
--
--
Brian Coca
--
You received this message because you are subscribed to the Google
that will conflict with the latest version being
used. Thankfully that tends to be a short list, mostly related to
technology that is still in its 'fast evolution' phase.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Develo
authors on review to use the existing alternative,
specially if they want to be included in Ansible's distribution. And,
if they cannot avoid it, be very clear about the versions required,
both in code and in docs.
--
Brian Coca
--
You received this message because you are subscribed
with them accordingly.
Once this evaluation has happened, the 'human' can remove the label to
confirm that the rest of the labeling is correct and does not need
reclassification.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"An
Just use vars: keyword.
vars:
int_serial_mode: '{{(serial_mode is defined)|ternary(3, 1)}}'
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving e
To clarify, unlike inventory scripts, inventory plugins don't 'return'
a format, they update the inventory itself.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this grou
in their options.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
For more opti
is you provide your vars in a role as defaults/main.yml,
which has the lowest precedence, instead of include_vars.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this grou
In this case you seem to be missing code to handle the
v2_runner_on_unreachable event.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails fro
programmers but not for other
users
- Issues get filed against the generated code, not the generator, this
can create a lot of work as it is 'complex double bookeeping'. Which
goes contrary to the main reason to autogenerate the modules, to
minimize the developer workload.
--
--
Brian
You dont need moustaches in conditionals:
when: builds[item] == pkgversion
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, sen
to define ini entries and env vars that the lookup can consume.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ans
You don't use get_config, you use self.get_option('optoinname'), see
shipped plugins for how to define options inside the DOCUMENTATION=
variable for the config system to automatically recognize them.
--
--
Brian Coca
--
You received this message because you are subscribed
and specific to the category) and their interest
in the plugin, after all this is mostly a volunteer effort.
The best place to get core involved is IRC, specifically the core
meetings
https://github.com/ansible/community/issues?q=is%3Aopen+is%3Aissue+label%3Acore
--
Brian Coca
--
You received
Writing the docs on how to write them is 'on my list'
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ans
Or you can just 'mount' s3 as a 'local drive' and point at it for inventory.
If you still want to 'autodownload' you might want to use an inventory
plugin instead of an inventory script.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
This should give you the beginning of what you need
"{{groups["names"]|product(groups["places"])|map('join',':')|list}}"
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
use slurp on 1 file then copy's 'content' option targetting the 2nd
with the content of the first, in checkmode and with --diff.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from
it.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
For more options, v
.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
For more options, v
the underlying module to execute. This still
relies on autodetection but can also be done via a `use` option to
force a specific module, basic options must be compatible with service
though.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
No one else is working on it afaik, so go ahead.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-deve
need, I would
not build this into Ansible iteslf as there are soo many tools out
there that already do this and it is extremely context dependent.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubs
1 - 100 of 135 matches
Mail list logo