I am trying to develop a playbook to set a common password on groups of
servers. The concept is that all servers within a given group would
receive one randomly generated password, all servers within the next group
would receive a different randomly generated password, and so on. The
issue
Unfortunately, I am under the constraint that I must use the password store
that the company has chosen to use (Passwordstate). I have that part
working fine. I am able to push passwords into it and pull them back out
with no problem. But the general structure of your code will probably be
I need to determine how many hosts are left to be worked on in a playbook
run. I have set serial to 1 in the playbook so only one host will be
worked on at a time, and I have a long pause at the bottom of the playbook
to force a settling period between hosts. But if the current host is the
la
n Mon, 18 Jan 2021 11:32:05 -0800 (PST)
>> > "'Mark Tovey' via Ansible Project"
>> > wrote:
>> >
>> > > I need to determine how many hosts are left to be worked on in a
>> playbook
>> > > run. I have set serial to 1
I am trying to use community.general.ldap_search to return the RootDSE from
a LDAP server (RedHat Directory Server). The LDAP server is configured to
allow anonymous access to the RootDSE (nsslapd-allow-anonymous-access:
rootdse) and I can retrieve it with ldapsearch:
ldapsearch -LLL -x -H lda
I found the answer:
ansible localhost -m community.general.ldap_search -a
"server_uri='ldap://myldapserver.example.com' validate_certs=false
bind_dn='' dn='' scope=base attrs=defaultnamingcontext"
localhost | SUCCESS => {
"changed": false,
"results": [
{
"defaultnam
I just performed a OS upgrade on our Ansible server from RedHat 7.6 to
RedHat 7.7, and now Ansible has become unusable. When I try to run any
task that uses any Ansible fact, I get the following error:
[WARNING]: Failure using method (v2_runner_on_ok) in callback plugin
():
value must be
I need to export some environment variables before running a task, but it
appears that setting variables with "environment" does not export them;
they remain local. For test, I wrote the following simple playbook:
---
- hosts: localhost
gather_facts: no
environment:
MYVAR: "TEST1"
I am working on a playbook to replace the comment field in a server's
password file. I was trying to use the replace module to do this. But it
began crashing on one server. By elimination I was able to isolate the
problem to one user's account entry in the password file. The user is
Dani
I have a dictionary structure that looks like the following:
myservers:
DC1:
CORE: 10.10.10.20
DMZ: 10.10.20.20
DC2:
CORE: 10.10.10.30.20
DMZ: 10.10.10.40.20
DC3:
CORE: 10.10.50.20
DMZ: 10.10.60.20
DC4:
CORE: 10.10.70.20
DMZ: 10.10.80.20
And another dictionary that look
I have a list:
list1
- value1
- value2
and I want to use set_fact create a new variable that contains these
variables with a label in front of them, so that this debug task:
- debug:
msg: "{{var1}}"
would result in output that looks like this:
label value1
label
I am trying to generate a variable name dynamically, but so far I have been
stymied.
I have lists whose names are based upon the OS name:
myos7:
- os7package1
- os7package2
- os7package3
myos8:
- os8package1
- os8package2
- os8package3
I want to access these lists dy
I hate having to constantly go here to solve issues like this,
especially when the issues I keep presenting are all so similar, but
eventually I have to just give up trying to solve this on my own and ask.
I want to define a structure in a vars file that looks like the
following:
myos
13 matches
Mail list logo