I am trying to install mariadb from a tar-archive and then make systemd mange 
the service with these 5 TASKS


- name: install mariadb - run the install script
shell:
cmd: ./mariadb-install-db --defaults-file=/opt/db/data/mysql/my.cnf 
--user=mysql --basedir=/opt/db/mysql/mariadb --datadir=/opt/db/data/mysql 
--skip-name-resolve
chdir: "{{ mariadb_base }}/mariadb/scripts"
become: yes
become_user: "{{ mariadb_user }}"

- name: systemd - cp 'mysql.server' >> '/etc/systemd/system/mysql.service'
copy:
src: /opt/db/mysql/mariadb/support-files/mysql.server
dest: /etc/systemd/system/mysql.service
remote_src: yes
become: yes

- name: systemd deamon-reload
systemd:
daemon_reload: yes
become: yes

- name: systemd - enable mysql.service in systemd
systemd:
name: mysql.service
enabled: yes
become: yes

- name: systemd - start mysql.service via systemd
systemd:
name: mysql.service
state: started
become: yes


Installation runs trough but I am getting an error with the 4th TASK enabling 
the mysql.service in systemd

TASK [mariadb_install : systemd - enable mysql.service in systemd] 
********************************************************************************************************
fatal: [vm-51150-0198.intern]: FAILED! => changed=false
msg: 'Error loading unit file ''mysql.service'': 
org.freedesktop.DBus.Error.InconsistentMessage "Unit mysql.service failed to 
loaded properly: Bad message."'

can anybody advise me where my error may be lying and how to get around it?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1268719660.340750.1642428320307%40office.mailbox.org.

Reply via email to