[ansible-project] Need to enter chroot on remote host

2020-12-14 Thread Mathias Jung
Hello, some servers i like to manage have a chroot. There I have to run: chroot /home/system/chroot to switch in. There i have to install packages with APT, store configurations, etc. Is there a chance to do that with ansible? -- You received this message because you are subscribed to the

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

2020-12-14 Thread Rick Elrod
Hi all- we're happy to announce that the general release of ansible-base 2.10.4 is now available! How to get it - $ pip install ansible-base==2.10.4 --user The tar.gz of the release can be found here: * ansible-base 2.10.4

[ansible-project] New Ansible releases 2.9.16 and 2.8.18

2020-12-14 Thread Rick Elrod
Hi all- we're happy to announce that the general release of Ansible 2.9.16 and 2.8.18 are now available! How do you get it? -- $ pip install ansible==2.9.16 --user or $ pip install ansible==2.8.18 --user The tar.gz of the releases can be found here: * 2.9.16

Re: [ansible-project] Proxmox

2020-12-14 Thread Pim Janssen
Thanks for the reply. This could run a command inside a container. But i would like to run a complete playbook inside a container. Now i can set something like: ansible_connection=ssh ansible_python_interpreter="pct exec 212 -- python3" ansible_remote_tmp=/var/lib/lxc/212/rootfs/var/tmp/ (it

Re: [ansible-project] 'dict object' has no attribute

2020-12-14 Thread jr
thx Vladimir this works to, but I already made this: --- - hosts: servera tasks: - getent: database: passwd - name: lock user: name: "{{ item }}" password_lock: yes loop: - uporabnik1 - uporabnik2 - uporabnik3 -

Re: [ansible-project] how to connect via ssh to different ansible nodes that have different root credentials ?

2020-12-14 Thread Brian Coca
though i would do as previous posters suggest, the way to do what you initially asked for can be done with setting ansible_user and ansible_password variables per host (i recommend using vault for the latter). -- -- Brian Coca -- You received this message because you are subscribed

[ansible-project] Re: Warning in ansible-base 2.10 (when running playbook)

2020-12-14 Thread Dan Michael O . Heggø
The warning tells you that you don't have the Python package called "packaging" installed locally. This is a direct dependency of ansible-base, so under normal circumstances it should be installed when you install ansible. If you're using poetry, however, it will not install automatically at

Re: [ansible-project] 'dict object' has no attribute

2020-12-14 Thread Vladimir Botka
On Mon, 14 Dec 2020 06:37:05 -0800 (PST) Jost Rakovec wrote: > ... lock list of users on linux only if user exist Try this - name: Get passwd getent: database: passwd - name: lock user: name: "{{ item }}" password_lock: yes loop: "{{

Re: [ansible-project] Re: Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Abhijeet Kasurde
ec2.py is deprecated and it is based upon a deprecated version of boto. Please use aws_ec2 as it is based upon the latest version of a boto and provides additional features. On Mon, Dec 14, 2020 at 7:08 PM Ashok Das wrote: > Hi Partha, > > Please try this > > >

[ansible-project] 'dict object' has no attribute

2020-12-14 Thread Jost Rakovec
Hi I would like to lock list of users on linux only if user exist, but have some problems: lock-user1.yml --- - name: lock users hosts: webservers tasks: - name: Check if user exists getent: database: passwd key: "{{ item }}" register: user_exists

Re: [ansible-project] Re: Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Ashok Das
Hi Partha, Please try this https://raw.githubusercontent.com/ansible/ansible/stable-1.9/plugins/inventory/ec2.py On Mon, Dec 14, 2020 at 7:03 PM Parth Patel wrote: > Ashok, > > I tried as i have mentioned in below mail trail, getting 404 Not found > error. > > On Mon, Dec 14, 2020 at 6:42

Re: [ansible-project] Re: Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Parth Patel
Ashok, I tried as i have mentioned in below mail trail, getting 404 Not found error. On Mon, Dec 14, 2020 at 6:42 PM Ashok Das wrote: > You can try this > > > https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/ec2.py > >

[ansible-project] Hetzner API with Ansible

2020-12-14 Thread Tonci Stanic
Greetings earthlings; has anyone succeed to roll new Hetzner VM from current VMs backup via Ansible? I would like to be able to run a playbook and automatically get desired numbers of servers up and running along side current one (for potential load balancing if resources go short). Any advice

Re: [ansible-project] Proxmox

2020-12-14 Thread Martin Etcheverry
Hi Pim , maybe this can work for you; you can run a command inside the container with something like that: - name: run command hosts: proxmox tasks: - name: Run command in container lxc_container: name: 133 state: started container_command: service ssh restart El dom, 13 dic 2020 a las 19:32,

[ansible-project] Re: Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Ashok Das
You can try this https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/ec2.py https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/ec2.ini On Monday, December 14, 2020 at 4:46:09 PM UTC+5:30 parthpat...@gmail.com wrote: > HI Team, > > On page >

Re: [ansible-project] Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Parth Patel
Got script from link you gave of github. For making script executable doing chmod. Isnt required ?? On Mon, 14 Dec 2020, 18:34 Abhijeet Kasurde, wrote: > Hi Parth, > > 1. Where did you get ec2.py? > 2. Why are you doing chmod ? > > Please refer >

Re: [ansible-project] Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Abhijeet Kasurde
Hi Parth, 1. Where did you get ec2.py? 2. Why are you doing chmod ? Please refer https://docs.ansible.com/ansible/latest/plugins/inventory.html#using-inventory-plugins for using aws_ec2 dynamic inventory plugin. On Mon, Dec 14, 2020 at 5:05 PM Parth Patel wrote: > Has script been tested and

Re: [ansible-project] Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Parth Patel
Has script been tested and working fine ? I am getting syntax error. [ansible@ip-172-3 dynamic_inventory]$ chmod 755 ec2.py [ansible@ip-172-3 dynamic_inventory]$ ./ec2.py ./ec2.py: line 4: syntax error near unexpected token `(' ./ec2.py: line 4: `from __future__ import (absolute_import,

Re: [ansible-project] Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Abhijeet Kasurde
Using dynamic inventory plugin - https://docs.ansible.com/ansible/latest/plugins/inventory.html#using-inventory-plugins On Mon, Dec 14, 2020 at 4:59 PM Abhijeet Kasurde wrote: > Yes, you may want to refer > https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ec2_inventory.html >

Re: [ansible-project] Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Abhijeet Kasurde
Yes, you may want to refer https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ec2_inventory.html for aws_ec2. On Mon, Dec 14, 2020 at 4:53 PM Parth Patel wrote: > Ahh okay thanks buddy. So below link is official ansible doc site right ? > > >

Re: [ansible-project] Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Parth Patel
Ahh okay thanks buddy. So below link is official ansible doc site right ? https://docs.ansible.com/ansible/latest/user_guide/intro_dynamic_inventory.html Thanks, P On Mon, Dec 14, 2020 at 4:50 PM Abhijeet Kasurde wrote: > Hi Parth, > > You are using docs which are not official docs. Also,

Re: [ansible-project] Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Abhijeet Kasurde
Hi Parth, You are using docs which are not official docs. Also, EC2 external inventory script is replaced by aws_ec2 inventory plugin. You can find it here - https://github.com/ansible-collections/amazon.aws/blob/main/plugins/inventory/aws_ec2.py On Mon, Dec 14, 2020 at 4:46 PM Parth Patel

[ansible-project] Re: Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Parth Patel
Nor the link - https://github.com/ansible/ansible/tree/devel/contrib/inventory works which all users on youtube vedios and web blogs used. May be domain changed ? Neither raw github user content domain worked instead github.com in this URL. On Monday, December 14, 2020 at 4:46:09 PM UTC+5:30

[ansible-project] Incorrect dynamic script source link - AWS EC2

2020-12-14 Thread Parth Patel
HI Team, On page https://ansible-docs.readthedocs.io/zh/stable-2.0/rst/intro_dynamic_inventory.html#example-aws-ec2-external-inventory-script Link to ec2 dynamic python inventory script, i see 404 not found error. Can anyone assist me please ? Thanks, Parth -- You received this message