[ansible-project] Re: Decryption fails: Error: HMAC verification failed: Signature did not match digest.

2020-08-13 Thread Papanito
Ok got it, the ci-machine runs on python 2 whereas on my dev-machine I have python 3. On Thursday, August 13, 2020 at 9:35:59 AM UTC+2 Papanito wrote: > I am using ansible 2.9.11 on my dev machine (arch linux) where I > encrypted ./resources/cloudflare/cert.pem. using ansible-vault with a >

[ansible-project] Decryption fails: Error: HMAC verification failed: Signature did not match digest.

2020-08-13 Thread Papanito
I am using ansible 2.9.11 on my dev machine (arch linux) where I encrypted ./resources/cloudflare/cert.pem. using ansible-vault with a password file. I have commited the file to source control. I can run the playbook without issues on my dev-machine i.e. decryption works Now on my ci machine

[ansible-project] scan servers if package is installed and send email

2020-08-13 Thread Laci
I'm looking for a playbook which would scan all servers and if a particular package (ex: kernel-3.10.0-1062 or nginx-1.12.2-2) is installed would send an email with the hostname. Did anyone do something alike? -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] Re: Decryption fails: Error: HMAC verification failed: Signature did not match digest.

2020-08-13 Thread Dick Visser
This seems to be a problem specific to your CI tool, so a logical place would be to consult the support channels of that CI tool (whichever it was - you didn't tell). Either way, how ansible-vault works is explained here: https://docs.ansible.com/ansible/latest/user_guide/vault.html. Fix your CI

Re: [ansible-project] What privilege required for an ansible user able to configure a server

2020-08-13 Thread Luca 'remix_tj' Lorenzetto
Hello, On Thu, Aug 13, 2020 at 2:30 PM Edison Wang wrote: > Hi There, > > I am pretty new in this domain and got a question to ask. My goal is to > create a new user "edison" on a Ubuntu server. Now I've already had a user > "manager" which is able to ssh to this Ubuntu server. This problem I

Re: [ansible-project] What privilege required for an ansible user able to configure a server

2020-08-13 Thread Stefan Hornburg (Racke)
On 8/13/20 2:30 PM, Edison Wang wrote: > Hi There, > > I am pretty new in this domain and got a question to ask. My goal is to > create a new user "edison" on a Ubuntu server. > Now I've already had a user "manager" which is able to ssh to this Ubuntu > server. This problem I got is after I run

Re: [ansible-project] Re: Decryption fails: Error: HMAC verification failed: Signature did not match digest.

2020-08-13 Thread Dick Visser
The problem might be in the way you invoke ansible-playbook in the gitlab CI. So, what does your .gitlab-ci.yml look like? On Thu, 13 Aug 2020 at 13:09, Papanito wrote: > > I already checked > https://docs.ansible.com/ansible/latest/user_guide/vault.html but I don't see > where the problem is.

Re: [ansible-project] scan servers if package is installed and send email

2020-08-13 Thread Vladimir Botka
On Thu, 13 Aug 2020 07:20:51 -0700 (PDT) Laci wrote: > I'm looking for a playbook which would scan all servers and if a particular > package (ex: kernel-3.10.0-1062 or nginx-1.12.2-2) is installed would send > an email with the hostname. > Did anyone do something alike? Collect "pkg_facts"

[ansible-project] files from .gitignore not found

2020-08-13 Thread Кирилл Старостин
Hi there! I want to use git-project in Ansible tower. I successfully created Git Project and template based on role /roles/mytest/. However I dont want to store /roles/mytest/files in the github, so I created /roles/mytest/files/.gitignore. Then I created manually file test.txt in the

Re: [ansible-project] What privilege required for an ansible user able to configure a server

2020-08-13 Thread Edison Wang
Hi Luca: I've added that command become: yes like you and Stefan said, and make my playbook as simple as below for a test. But after I run this playbook where I didn't see any error, I still couldn't see the new user "edison" created on target server. However if I run this playbook on my

Re: [ansible-project] Re: Decryption fails: Error: HMAC verification failed: Signature did not match digest.

2020-08-13 Thread Papanito
I already checked https://docs.ansible.com/ansible/latest/user_guide/vault.html but I don't see where the problem is. I use a shared gitlab runner: https://docs.gitlab.com/ee/ci/runners/README.html Well, in the end it's a docker image so you think is still a ci issue or can it be related to

[ansible-project] What privilege required for an ansible user able to configure a server

2020-08-13 Thread Edison Wang
Hi There, I am pretty new in this domain and got a question to ask. My goal is to create a new user "edison" on a Ubuntu server. Now I've already had a user "manager" which is able to ssh to this Ubuntu server. This problem I got is after I run user creation role with user "manager" as

Re: [ansible-project] how to share variables between hosts

2020-08-13 Thread Stefan Hornburg (Racke)
On 8/13/20 1:49 PM, Gabriel Sousa wrote: > i have this: > > --- > - hosts: all >   vars: >   - site: "{{ ansible_hostname | regex_replace('^(.{2}).*' ,'\\1' ) }}" >   - datavg: DATAVG >   - datavgpvs: /dev/sdb >   - lv_int: >     - { lv: app, size: "{{appS}}", vg: "{{datavg}}", fs: xfs, mount:

Re: [ansible-project] wild card is not working for adapter_names in win_dns_client

2020-08-13 Thread Prakash PMS
Thank you. Yes. we can fetch using powershell. I was wondering why wild card support given in the documentation is not working. Now I am able to use '*' like given in the first example below and it works. But the second example given in the documentation doesn't work.

[ansible-project] Re: Decryption fails: Error: HMAC verification failed: Signature did not match digest.

2020-08-13 Thread Papanito
Even so I explicitly set python3 as default, I still get the same error as mentioned. This is what I do on my ci-server - apt-get install python3.7 python3-apt -qy - update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1 - update-alternatives --set python /usr/bin/python3.7 I

[ansible-project] how to share variables between hosts

2020-08-13 Thread Gabriel Sousa
i have this: --- - hosts: all vars: - site: "{{ ansible_hostname | regex_replace('^(.{2}).*' ,'\\1' ) }}" - datavg: DATAVG - datavgpvs: /dev/sdb - lv_int: - { lv: app, size: "{{appS}}", vg: "{{datavg}}", fs: xfs, mount: "/app" } - hosts: - a become: yes become_method: sudo

Re: [ansible-project] Re: Decryption fails: Error: HMAC verification failed: Signature did not match digest.

2020-08-13 Thread Adrian Wyssmann
I am using Gitlab On Thu, Aug 13, 2020, 12:17 Dick Visser wrote: > This seems to be a problem specific to your CI tool, so a logical > place would be to consult the support channels of that CI tool > (whichever it was - you didn't tell). > Either way, how ansible-vault works is explained here:

Re: [ansible-project] scan servers if package is installed and send email

2020-08-13 Thread Laci
Thank you Vladimir! This looks almost good, it finds the package only if no specific version is specified. For example it will find nginx and send email but won't find nginx-1.12.2 On Thursday, August 13, 2020 at 11:09:22 AM UTC-4, Vladimir Botka wrote: > > On Thu, 13 Aug 2020 07:20:51 -0700

[ansible-project] Running Sync using ansible

2020-08-13 Thread Jay Amin
Hello Everyone, I am trying to run sync for /home directory and everything within this directory (including permissions) between Ansible Controller Node and Remote Node. I would like to run this sync on Controller Node and it will basically run based on defined time to keep

Re: [ansible-project] scan servers if package is installed and send email

2020-08-13 Thread Vladimir Botka
Laci, On Thu, 13 Aug 2020 08:47:31 -0700 (PDT) Laci wrote: > ... it finds the package only if no specific version is > specified. For example it will find nginx and send email but won't > find nginx-1.12.2 Try this. Loop "with_together" lists of packages' names and versions. In the task's

Re: [ansible-project] scan servers if package is installed and send email

2020-08-13 Thread Laci
Awesome, thank you very much! On Thursday, August 13, 2020 at 1:47:07 PM UTC-4, Vladimir Botka wrote: > > Laci, > > On Thu, 13 Aug 2020 08:47:31 -0700 (PDT) > Laci > wrote: > > > ... it finds the package only if no specific version is > > specified. For example it will find nginx and send

Re: [ansible-project] Upgrade Ansible from 2.9.10 to 2.9.11 on RHEL8

2020-08-13 Thread Jay Amin
Thank you all for your responses and feedback. It definitely did put me in right direction. I was able to get 2.9.11 installed/upgraded. Basically, I had to create new custom repo and add the 2.9.11 rpm file to it. Then had to go into RHEL .conf files (change enabled=1 to enabled=0) so that

Re: [ansible-project] What privilege required for an ansible user able to configure a server

2020-08-13 Thread Stefan Hornburg (Racke)
On 8/13/20 5:33 PM, Edison Wang wrote: > Hi Luca:  > >    I've added that command become: yes like you and Stefan said, and make my > playbook as simple as below for a test. But > after I run this playbook where I didn't see any error, I still couldn't see > the new user "edison" created on

[ansible-project] Re: 2 levels nested loop with variables

2020-08-13 Thread Nick-H
so, I have been trying with lookup('dict') but still not quite close to the expected result I get: " An unhandled exception occurred while running the lookup plugin 'dict'. Error was a , original message: with_dict expects a dict" her is the last code : iam_managed_policy: policy_name:

Re: [ansible-project] Re: 2 levels nested loop with variables

2020-08-13 Thread Stefan Hornburg (Racke)
On 8/13/20 8:00 PM, Nick-H wrote: > so, I have been trying with lookup('dict')  but still not quite close to the > expected result  > I get: " An unhandled exception occurred while running the lookup plugin > 'dict'. Error was a 'ansible.errors.AnsibleError'>, original message: with_dict

[ansible-project] New release: ansible-base 2.10.0

2020-08-13 Thread Rick Elrod
Hi all- we're happy to announce that the new ansible-base 2.10 package is now available! The ansible-base package consists of only the Ansible execution engine, related tools (e.g. ansible-galaxy, ansible-test), and a very small set of built-in plugins. The ansible-base package is the culmination

[ansible-project] Help on ec2 creation using ansible

2020-08-13 Thread Alfred Kamga
Hello guys, I have an issue with my ansible file.: --- - hosts: localhost #user: root #connection: local gather_facts: no become: no # ignore_errors: yes tasks: - name: Install python-pip yum: name: python-pip state: present - name: Install boto

[ansible-project] run cmd using password

2020-08-13 Thread nage...@gmail.com
Hi Team, i would like to run this cmd with sudo with vcf password how i can run the cmd with vcf user and password ? how i can achieve this ? i am not getting proper answer from the google Playbook: --- - name: sddc_health hosts: sddc_mgr tasks: - name: heleth check command:

Re: [ansible-project] Re: 2 levels nested loop with variables

2020-08-13 Thread Nick-H
Thanks Racke, I should have had some context. policy_name can vary, actually in the real task I have other policies with other names, hence the use of a loop for item.name and item.policy . Just this specific one named rds_foo_bar needs the nested arguments from my vars list(or dict I am not

[ansible-project] Re: run cmd using password

2020-08-13 Thread nage...@gmail.com
Hi just modify the file, getting below error role task : name: SDDC Health command: sudo /opt/vmware/sddc-support/sos --health-check register: find_output - debug: var: find_output ~ Playbook: --- - name: sddc_health hosts: sddc_mgr become: yes become_user: root

Re: [ansible-project] Help on ec2 creation using ansible

2020-08-13 Thread Dick Visser
Your code uses a templates variable as the image, which fails. Then you supply a list, which also fails. This is correct as the image parameter requires a simple string: https://docs.ansible.com/ansible/latest/modules/ec2_module.html Follow that documentation. There might be more issues ahead, I

Re: [ansible-project] Help on ec2 creation using ansible

2020-08-13 Thread Alfred Kamga
Thank you brother,m you made me mile. now i know what to do On Thursday, August 13, 2020 at 5:45:12 PM UTC-4 dick@geant.org wrote: > Your code uses a templates variable as the image, which fails. > Then you supply a list, which also fails. > This is correct as the image parameter requires a