Re: [ansible-project] Re: don't print statement if "command not found" and compare variable value with list of values

2018-11-16 Thread Dan Linder
Correction to my previous email: You *COULD* run a play right before it that registers the full path of `systemctl` found on the system (maybe use `shell: which systemctl`), but that is not a stable method in some cases. I suggest using `systemd:` with the OS version check if needed. On Fri,

[ansible-project] Re: don't print statement if "command not found" and compare variable value with list of values

2018-11-16 Thread dan
I'd suggest not using the `shell:` module, instead use the `systemd:` module. Then setup the `when:` clause with a third that only executes this play on OS versions that have `systemctl` (e.g. RHEL 7+, etc). You run a play right before it that registers the full path of `systemctl` found on

Re: [ansible-project] Installing WinRM offline

2018-11-16 Thread Dick Visser
On Fri, 16 Nov 2018 at 23:45, Kartik Jayaraman wrote: > Hello, > > I have a Centos VM which is cut off from the internet. It does have > Ansible installed but does not have pywinrm installed. It did not even have > pip installed. > > So I installed pip offline, basically downloaded the tar.gz

[ansible-project] Installing WinRM offline

2018-11-16 Thread Kartik Jayaraman
Hello, I have a Centos VM which is cut off from the internet. It does have Ansible installed but does not have pywinrm installed. It did not even have pip installed. So I installed pip offline, basically downloaded the tar.gz and copied to the VM using WinSCP. After which i installed using

Re: [ansible-project] ANSIBLE PERMISSIONS

2018-11-16 Thread Brian Coca
Not all modules are wrappers to shell commands, specifically this module is not using any commands, its using python code and system calls, which you cannot create sudo entries for. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups

[ansible-project] ANSIBLE PERMISSIONS

2018-11-16 Thread fahad . riaz1718
I wrote a playbook that allows a local user to use ansible "LINEINFILE" module to edit /etc/sssd/sssd.conf and /etc/fstab. However I gave that local user to run all sudo commands without password. I want to limit the local user and only give specific permissions in the /etc/sudoers file. . I

Re: [ansible-project] ansible-pull minimal standalone version

2018-11-16 Thread Brian Coca
ansible-pull uses ansbile and ansible-playbook under the hood, so the ansible package IS the minmal package available you might want to trim modules/plugins you don't use but that depends on the plays being executed. -- -- Brian Coca -- You received this message because you are

Re: [ansible-project] subversion export issue

2018-11-16 Thread Dick Visser
It doesn't get any clearer that this. Your svn repo is probably an HTTPS one, but you're using a hostname that isn't in the certificate. Hence, svn will bail out. Dick On Fri, 16 Nov 2018 at 13:48, wrote: > > Hi All, > > I am trying to export subversion repo using ansible-playbook. > > --- > -

[ansible-project] don't print statement if "command not found" and compare variable value with list of values

2018-11-16 Thread moissetgerard0
i'm trying this in a playbook: .. vars: actionTodo: "{{ variable_actionTodo }}" servicesList: "{{ variable_servicesList }}" actionTodo_list: [start,stop,rstart,rstop,status,rstatus] .. - name: manage services using systemctl tags: manage services using systemctl shell:

[ansible-project] subversion export issue

2018-11-16 Thread rajendra . rawat17
Hi All, I am trying to export subversion repo using ansible-playbook. --- - hosts: remoteserver tasks: - name: "checkout subversion repo " subversion: repo= dest=/abc/xyz/subdir force=yes export=yes username={{ subversion_username }} password={{

Re: [ansible-project] {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_default_ipv4'"}

2018-11-16 Thread 'Stephen C.' via Ansible Project
Hi Tom, Can you try a couple of options and post it to this thread please ? With the same inventory file: [mysql] mysql01 mysql02 mysql03 mysql04 ansible-playbook -i infra --limit mysql02 main.yml --tags "mysql" -v ansible-playbook -i infra --limit mysql03 main.yml --tags

Re: [ansible-project] Get "Could not find the requested service" when trying to restart httpd; but it is installed

2018-11-16 Thread Dick Davies
Could not find the requested service ['httpd']: host"} looks to me like your issue is in the playbook., You're passing an array ( 'services' ) in as the service name, ansible is treating that as a length 1 array rather than just a string. Replace the "{{ services }}" with just : httpd and I bet

Re: [ansible-project] how to use systemd to start my custom service

2018-11-16 Thread Dick Davies
"msg": "Failed to get D-Bus connection: Operation not permitted", you're not running ansible with high enough privileges. try a become: yes somewhere in there. On Thu, 15 Nov 2018 at 02:47, Ronnie10 wrote: > > Hi all, > > I am trying to setup zookeeper using ansible with docker, I have copied

Re: [ansible-project] Parallel execution of tasks in playbook

2018-11-16 Thread 'J Hawkesworth' via Ansible Project
Hello, Ansible will run tasks in parallel against groups of hosts, so I suggest you convert your apache_sever_list.yaml file into ansible inventory format and put all the hosts in it into a group called 'apache' then you can run tasks against - hosts: apache tasks: - name: any