Re: [ansible-project] Jinja template as variable value

2021-05-07 Thread Mario S
Thank you for checking it out. So shouldn't ../templates/option.ji2 work? Anyways, I had to move on with the project and now template module is used instead of lineinfile, inside ji2 file include works as expected. Not the most elegant solution but it does the job. piątek, 7 maja 2021 o 08:42:29

[ansible-project] using lookup(csvfile) with and encrypted file with vault fails

2021-05-07 Thread Pabolito Garci
Hello, Using ansible 2.9.19 in a RHEL7.8 server python version = 2.7.5 I am trying to set facts from a lookup into a csv file. The playbook works but as the facts set are passwords, I need to encrypt the content to the file. I did : ansible-vault encrypt " hpe_sut_security_store .csv" This is

Re: [ansible-project] using lookup(csvfile) with and encrypted file with vault fails

2021-05-07 Thread Dick Visser
On Fri, 7 May 2021 at 10:53, Pabolito Garci wrote: > is there something wrong I am doing or it is expected behaviour that set_fact > or lookup(csvfile) wont see it as en encrypted file? AFAIK the csvfile lookup does not support vaulted cvsfiles -- Dick Visser Trust & Identity Service Operati

[ansible-project] Is it possible to use ansible without root password ?

2021-05-07 Thread Lomic Legone
Hi all, I'm a newbee on ansible and I follow online tutos. I installed 2 ubuntu VM (named ubunt1 and ubunt2), one as node manager (ubuntu1) and the second one as simple node (ubuntu2). The ssh connection is tested and ok. When I installed ubuntu, I've never been asked for a root password, but

Re: [ansible-project] Is it possible to use ansible without root password ?

2021-05-07 Thread Dick Visser
Hii On Fri, 7 May 2021 at 11:40, Lomic Legone wrote: > > Hi all, I'm a newbee on ansible and I follow online tutos. > > I installed 2 ubuntu VM (named ubunt1 and ubunt2), one as node manager > (ubuntu1) and the second one as simple node (ubuntu2). The ssh connection is > tested and ok. > > When

Re: [ansible-project] using lookup(csvfile) with and encrypted file with vault fails

2021-05-07 Thread Vladimir Botka
On Fri, 7 May 2021 01:53:22 -0700 (PDT) Pabolito Garci wrote: > - name: read credentials from csv file > set_fact: > hpe_sut_cred_user: "{{ lookup('csvfile', inventory_hostname +' > file=hpe_sut_security_store.csv delimiter=; col=1') }}" > hpe_sut_cred_pwd: "{{ lookup('

[ansible-project] How to list a subelement from hostvars for all ansible_play_hosts in a single line

2021-05-07 Thread jean-christophe manciot
The use case is to run a specific task once over all hosts only when at least one host failed the previous task. It could be something like: - name: How to list a subelement from hostvars for all ansible_play_hosts gather_facts: True hosts: all strategy: de

[ansible-project] Re: How to list a subelement from hostvars for all ansible_play_hosts in a single line

2021-05-07 Thread jean-christophe manciot
The solution seems to be easy actually: when: ansible_play_hosts | map('extract', hostvars, 'return_task') | list | selectattr('failed') | list is any -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop re

RE: [ansible-project] Is it possible to use ansible without root password ?

2021-05-07 Thread Stuart Lowe
When you install ubuntu it will create a user in the sudoers group for you. If you are using that user to ssh in then elevating to root with sudo you enter the password for that user. Same with ansible, if you are using the user you created you’d use that users password to authenticate with beco

[ansible-project] Pfsense install via ansible playbook

2021-05-07 Thread rebecca acheampong
Hello, Please can someone help me with how to install pfsense using ansible on a remote host? Any suggestion is appreciated. Thank you -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

Re: [ansible-project] Jinja template as variable value

2021-05-07 Thread Brian Coca
This won't work as you expect line: "{% set option = item %}{% include 'option.ji2' %}" do this instead line: " {{lookup('template', 'option.j2', template_vars={'option': item}) }} On Fri, May 7, 2021 at 4:13 AM Mario S wrote: > > Thank you for checking it out. > So shouldn't ../templates/optio

Re: [ansible-project] Kerberos without dns

2021-05-07 Thread gajendra....@gmail.com
Hello, its related to ansbile, i wanted to use kerberos in authentication without dns On Friday, May 7, 2021 at 3:15:58 AM UTC+5:30 dick@geant.org wrote: > How does this question related to ansible? > > On Thu, 6 May 2021 at 19:10, gajendra@gmail.com < > gajendra@gmail.com> wrote:

Re: [ansible-project] Pfsense install via ansible playbook

2021-05-07 Thread Dick Visser
How would you do this without ansible? On Fri, 7 May 2021 at 16:00, rebecca acheampong wrote: > Hello, > Please can someone help me with how to install pfsense using ansible on a > remote host? > Any suggestion is appreciated. > > Thank you > > -- > You received this message because you are sub

Re: [ansible-project] seboolean module in 2.10

2021-05-07 Thread David Reagan
Neither https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-and-running-the-devel-branch-from-source nor https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#common-environment-setup doesn't mention anything about needing

Re: [ansible-project] Pfsense install via ansible playbook

2021-05-07 Thread rebecca acheampong
I mean to do it with ansible. I cannot find any playbook that has been used to install pfsense already and I don't know how to do that. On Fri, May 7, 2021, 6:35 PM Dick Visser wrote: > How would you do this without ansible? > > > On Fri, 7 May 2021 at 16:00, rebecca acheampong > wrote: > >> He

Re: [ansible-project] Pfsense install via ansible playbook

2021-05-07 Thread Antony Stone
On Friday 07 May 2021 at 21:47:18, rebecca acheampong wrote: > I mean to do it with ansible. I cannot find any playbook that has been used > to install pfsense already and I don't know how to do that. No, the reason why Dick asked "how would you do this without ansible" is because creating a pla