James Morgan
2015-05-21 12:21:48 UTC
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 <module>
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
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 <module>
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
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/191119ed-725c-4658-9df4-c05a0d2abf9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/191119ed-725c-4658-9df4-c05a0d2abf9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.