[ansible-project] ntp.j2 for different set of hosts

2019-01-17 Thread coach rhca
Hi, I have created a role for the ntp with the ntp.j2 and ntp1.j2 templates in templates diretory . with ntp.j2 consisting of server 2.2.2.1 iburst and with tp. ntp1.j2 consist of server 1.2.1.3 iburst In the task under the - name: template: src: ntp.conf.j2 dest:

[ansible-project] Re: Ansible vault -- "ERROR! playbooks must be a list of plays"

2019-01-17 Thread Tony Chia
It's a lot easier if you just encrypt the value and not the whole file so you can find where a variable is defined. For example ansible-vault encrypt_string --vault-id dev@password 'fdev' --name 'the_dev_secret' Result: the_dev_secret: !vault | $ANSIBLE_VAULT;1.2;AES256;dev

Re: [ansible-project] How to assign inventory group alias to a variable?

2019-01-17 Thread Robert F
Thank you! That is the solution. On Thursday, January 17, 2019 at 1:27:40 PM UTC-8, Kai Stian Olstad wrote: > > On 17.01.2019 21:25, Robert F wrote: > > I have this Ansible inventory file: > > > > [fileservers] > > fs01.example.com ansible_ssh_host=192.168.1.1 > >

Re: [ansible-project] How to assign inventory group alias to a variable?

2019-01-17 Thread Kai Stian Olstad
On 17.01.2019 21:25, Robert F wrote: I have this Ansible inventory file: [fileservers] fs01.example.com ansible_ssh_host=192.168.1.1 ip_addr=192.168.1.1 [dbservers] db01.example.com ansible_ssh_host=192.168.1.2 ip_addr=192.168.1.2 [webservers]

[ansible-project] How to assign inventory group alias to a variable?

2019-01-17 Thread Robert F
I have this Ansible inventory file: [fileservers] fs01.example.com ansible_ssh_host=192.168.1.1ip_addr=192.168.1.1 [dbservers] db01.example.com ansible_ssh_host=192.168.1.2ip_addr=192.168.1.2 [webservers] web01.example.com ansible_ssh_host=192.168.1.3

[ansible-project] Ansible 2.7.6 and 2.6.12

2019-01-17 Thread Toshio Kuratomi
Hi all- we're happy to announce that the general releases of Ansible 2.7.6 and Ansible 2.6.12 are now available! How do you get it? -- $ pip install ansible==2.7.6 --user or $ pip install ansible==2.6.12 --user The tar.gz

[ansible-project] Re: Ansible vault -- "ERROR! playbooks must be a list of plays"

2019-01-17 Thread flowerysong
On Thursday, January 17, 2019 at 11:35:12 AM UTC-5, John Harmon wrote: > > > I wouldn't be surprised if I am using this incorrectly, but I could use > some outside input. Consider the following tree (not in a role): > . > ├── get_user_info.yml > └── vault.yml > > > *Q1: I had to use vars_files

Re: [ansible-project] alternate shadow file?

2019-01-17 Thread Hugo Gonzalez
If there is a complete chroot environment under /mnt/pxe, you could configure a new ansible user to always log into a chrooted environment, using a sshd_config file and these two lines: Match User new_ansible_user ChrootDirectory /mnt/pxe Then use ansible normally under that special user.

[ansible-project] Ansible vault -- "ERROR! playbooks must be a list of plays"

2019-01-17 Thread John Harmon
I wouldn't be surprised if I am using this incorrectly, but I could use some outside input. Consider the following tree (not in a role): . ├── get_user_info.yml └── vault.yml vault.yml contents: --- ansible_user: someguy ansible_password: SecretPassword get_user_info.yml contents: --- -

Re: [ansible-project] Use of Ansible under PowerVC

2019-01-17 Thread Bernard Tremblay
Thanks for the info. I'll start looking at OpenStack APIs first ont the IBM support site. Le mercredi 16 janvier 2019 17:43:27 UTC-5, Hugo Gonzalez a écrit : > > Hello Bernard, > On 1/16/19 4:19 PM, Bernard Tremblay wrote: > > Hi, > > We are trying to use ansible in a PowerVC environment.

Re: [ansible-project] alternate shadow file?

2019-01-17 Thread eric.b.hymowitz via Ansible Project
Unless the functionality has changed, it's my understanding that ansible cannot use chroot when managing a remote machine. On Wednesday, January 16, 2019 at 6:13:11 PM UTC-5, Brian Coca wrote: > > use chroot to /mnt/pxe and then use user module, passwd will then > 'work as expected', with

[ansible-project] Re: Issuing creating domain users with module win_dsc and resource xADuser parsing pscredentials

2019-01-17 Thread java_cat33
Please ignore formatting in the last pasted bit of code - upn and groups are in a line indented from loop. On Thursday, January 17, 2019 at 10:42:29 PM UTC+13, java_cat33 wrote: > > I got the play working user dsc by removing the duplicate password entry, > but I also had to add the field of

[ansible-project] Re: Issuing creating domain users with module win_dsc and resource xADuser parsing pscredentials

2019-01-17 Thread java_cat33
I got the play working user dsc by removing the duplicate password entry, but I also had to add the field of "PasswordAuthentication" and set this to "Negotiate" for it to work! Thanks for your help. In regards to your last question I get the error of "your username or password is incorrect,