On Thursday, 8 November 2018 15:41:49 CET dean warren wrote:
> 1)
> - name: install mysql
>   become: true
>   zypper:
>     name: /tmp/mysql-community-{server,client,common,libs}-*
>     state: present
> 
> Gives the following error:
> Zypper run command failed with return code 4.
> Problem occurred initializing or executing the search query: Invalid regular 
> expression 
> (/tmp/mysql-5.7.22-1/mysql-community-{server|client|common|libs}-*) regcomp 
> returned 10.
> See the above message for a hint. Running zypper refresh as root might 
> resolve the problem.

Documentation say you only can use * with state: latest and then the name can 
only be a '*' aka upgrade all.


> 2)
> 
> - name: install mysql
>   become: true
>   zypper:
>     name: /tmp/mysql-community-common-5.7.22-1.sles12.x86_64.rpm \
>           /tmp/mysql-community-libs-5.7.22-1.sles12.x86_64.rpm \
>           /tmp/mysql-community-client-5.7.22-1.sles12.x86_64.rpm \
>           /tmp/mysql-community-server-5.7.22-1.sles12.x86_64.rpm
>     state: present
> 
> Give the following error:
> Zypper run command failed with return code 3. Specified local path does not 
> exist or is not accessible. Problem retrieving the specified RPM file. 
> Malformed URI: Please check whether the file is accessible.
> Problem with the RPM file specified as 
> /tmp/mysql-community-common-5.7.22-1.sles12.x86_64.rpm \\ 
> /tmp/mysql-community-libs-5.7.22-1.sles12.x86_64.rpm \\ 
> /tmp/mysql-community-client-5.7.22-1.sles12.x86_64.rpm \\ 
> /tmp/mysql-community-server-5.7.22-1.sles12.x86_64.rpm, skipping. No valid 
> arguments specified.

There is no packed called
"/tmp/mysql-community-common-5.7.22-1.sles12.x86_64.rpm \ 
/tmp/mysql-community-libs-5.7.22-1.sles12.x86_64.rpm \ 
/tmp/mysql-community-client-5.7.22-1.sles12.x86_64.rpm \ 
/tmp/mysql-community-server-5.7.22-1.sles12.x86_64.rpm"

according to the documentation you need one name or package specifier, if you 
need more than one it takes a list.


> 3)
> - name: install mysql client
>   become: true
>   zypper:
>     name: /tmp/mysql-community-*
>     state: present
> 
> 
> Gives the following error:
> No provider of /tmp/mysql-community-* found.

"A repeat of my first comment."


> I guess I could use shell or command module, running either Zypper or RPM, 
> but would prefer to use the zypper module.
> 
> Any suggestions?

Disclaimer:
Never used zypper just read the documentation
https://docs.ansible.com/ansible/latest/modules/zypper_module.html


-- 
Kai Stian Olstad


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7927989.3zfgNOuhqN%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to