Hi,
Having problems with mysql_user.
ConfigParser.NoSectionError: No section: ‘client’
I have googled it and similar issues have come up but I can’t see a fix.
This only happens in certain environments. All envs are using
Ansible - 1.9.1
MySQL - 5.1.73
/etc/my.cnf has the client section
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
- name: Create sitebuilder MySQL user
sudo: yes
mysql_user:
name: “{{ sitebuilder_db_user }}”
password: “{{ sitebuilder_db_password }}”
priv: “.:ALL,GRANT”
host: “%”
state: present
BECOME-SUCCESS-tdahgaeutuqqguopfedkwwxxamyfnaig
Traceback (most recent call last):
File “/home/obadmin/.ansible/tmp/ansible-tmp-1432210565.88-226550115643277/mysql_user”, line 2247, in
main()
File “/home/obadmin/.ansible/tmp/ansible-tmp-1432210565.88-226550115643277/mysql_user”, line 474, in main
mycnf_creds = load_mycnf()
File “/home/obadmin/.ansible/tmp/ansible-tmp-1432210565.88-226550115643277/mysql_user”, line 408, in load_mycnf
passwd = config_get(config, ‘client’, ‘password’)
File “/home/obadmin/.ansible/tmp/ansible-tmp-1432210565.88-226550115643277/mysql_user”, line 364, in config_get
return strip_quotes(config.get(section, option))
File “/usr/lib64/python2.6/ConfigParser.py”, line 311, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: ‘client’
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /home/builder/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: auto-mux: Trying existing master
debug2: fd 3 setting O_NONBLOCK
debug2: mux_client_hello_exchange: master version 4
debug3: mux_client_request_forwards: requesting forwardings: 0 local, 0 remote
debug3: mux_client_request_session: entering
debug3: mux_client_request_alive: entering
debug3: mux_client_request_alive: done pid = 11362
debug3: mux_client_request_session: session request sent
debug1: mux_client_request_session: master session id: 2
debug1: mux_client_request_session: master session id: 2
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 0
Any help much appreciated
J