Re: [ansible-project] Password change automation

2019-01-25 Thread boncalo mihai
Hi Kai, Thanks, it worked like a charm :) I already worked with inventory files but since I did it only few times i missed it. The thing is that Ansible uses /etc/hosts file in a way, because the hostname you place into inventory file, or in ansible hosts file must be found in /etc/hosts file

Re: [ansible-project] Password change automation

2019-01-25 Thread Kai Stian Olstad
On 25.01.2019 22:51, boncalo mihai wrote: I don't know Ansible too much but the error "skipping: no hosts matched" doesn't seem related to the hashing issue What intrigues me is that I specified the hostname ansible2, which can be found in /etc/hosts Ansible doesn't use /etc/hosts, you

Re: [ansible-project] Password change automation

2019-01-25 Thread boncalo mihai
But I'm using a hashing filter inside the platbook for that - password_hash('sha512') >From your link - "Use the integrated Hashing filters to generate a hashed version of a password. You shouldn’t put plaintext passwords in your playbook or host_vars; instead, use Using Vault in playbooks to

[ansible-project] malformed output when we have variables in the command line-cisco ASA device

2019-01-25 Thread Sahar
I'm running the following commands, the output is malformed, May I know how I can fix it? - name: Checking DNS Parameters asa_command: commands: - 'show run policy-map type inspect dns "{{ policy_map }}" | i maximum' register: output - name: show DNS Parameters

Re: [ansible-project] Password change automation

2019-01-25 Thread Hugo Gonzalez
The password field must be hashed for all unices. You’re using plaintext for that. The ansible docs: Optionally set the user's password to this crypted value. On macOS systems, this value has to be cleartext. Beware of security issues. To create a disabled account or Linux systems, set this to

Re: [ansible-project] Create variables in hash

2019-01-25 Thread boncalo mihai
key: {{ my_key | hash('sha1') }} ... Hashing filters New in version 1.9. To get the sha1 hash of a string: {{ 'test1' | hash('sha1') }} To get the md5 hash of a string: {{ 'test1' | hash('md5') }} Get a string checksum: {{ 'test2' | checksum }} Other hashes (platform dependent): {{

[ansible-project] Password change automation

2019-01-25 Thread boncalo mihai
Hi, I know there are lots of examples on the internet but I can't make it work ansible-playbook --private-key=/root/docker/aatool/ky.pem --extra-vars admin_password=T3est@ chpass.yml [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not

[ansible-project] Create variables in hash

2019-01-25 Thread Rafael Tomelin
Hi dear, How can create variables in hash, example: --- # vars file for roles my_var_root: my_sub_var: name: example env: environment key: my_key And how, pull in code? -- Atenciosamente, Rafael Tomelin Tel.: 51-84104084 Skype: rafael.tomelin LPI ID: LPI000191271

[ansible-project] Re: need ansible to wait for a springboot acutuator heathcheck to show up

2019-01-25 Thread Adam E
something like this should work - name: "wait for status" shell: bash -c 'curl -s http://{{ server_name }}: *8093/service/actuator/health* |egrep "^status"' register: cmd_res retries: "60" delay: 1 until: cmd_res.stdout.find('"status": "UP") != -1 On Friday, January 25, 2019 at

[ansible-project] Re: is there a way to exit an included file but continue the play?

2019-01-25 Thread Josef Fortier
> > > But again, re-think your approach, it doesn't sound like a good idea: > - roles have been invented for a reason... > - I always try to replace the typical `include/when: somevariable has > somevalue` pattern with `include {{somevariable}}.yml` to avoid all those > skips > Roles are not a

[ansible-project] Does Ansible prevent 2 Tasks from modifying the same part of a system?(thus, Task 2 undoing what Task 1 did)

2019-01-25 Thread Sylvain Martel
Hi, We are new to using ansible, and I saw something while going through our early code that had me worried. I have CoderA and CoderB that are starting to create roles and tasks. In one Task, coderA adds IIS features, but coderB, in another role , also adds some IIS features in a Task,

[ansible-project] need ansible to wait for a springboot acutuator heathcheck to show up

2019-01-25 Thread IP Freely
Hi Hope you can help me again I need to wait for a spring application to start before moving on in my playbook. when the microservice starts it runs flyway script that can take a long time to run before the service actually starts working. would the uri module be able to check a specific url

Re: [ansible-project] Need Debug Output

2019-01-25 Thread Diptajeet Khan
Ok but it was stuck mostly with parsing the debug output. Best Regards Diptajeet On Fri, Jan 25, 2019, 6:23 PM Jonathan Lozada De La Matta < jloza...@redhat.com wrote: > You mentioned you needed debug output and I linked the docs that mentioned > how to do it. > > On Thu, Jan 24, 2019 at 9:07

Re: [ansible-project] Need Debug Output

2019-01-25 Thread Jonathan Lozada De La Matta
You mentioned you needed debug output and I linked the docs that mentioned how to do it. On Thu, Jan 24, 2019 at 9:07 PM Diptajeet Khan wrote: > Hi Jonathan, > > Didn't get what is meant by following the link. > > Best Regards > Diptajeet > > On Fri, Jan 25, 2019, 5:27 AM Jonathan Lozada De La

[ansible-project] Ansible Kerberos Cannot contact any KDC for realm

2019-01-25 Thread sindhu shree
Can anyone guide me why am getting this error ? UNREACHABLE! => { "changed": false, "msg": "Kerberos auth failure: kinit: Cannot contact any KDC for realm 'AD.DOMAIN.COM' while getting initial credentials", "unreachable": true } My inventory and krb5.conf files looks like this

[ansible-project] Is there a way to get current task name?

2019-01-25 Thread Lionel Félicité
Hi all, Is there a way to get the current task name? With this example plyabook, I got an undefined "name" variable --- > > > > > -

[ansible-project] Re: is there a way to exit an included file but continue the play?

2019-01-25 Thread elavarde
I'd tend to say that your approach isn't the best use of Ansible, as, whichever solution you'll find, you'll end with a lot of skipped tasks in your output, making it difficult to understand what is happening. This said, you could split each snippet in two snippets, where the first one is