Skip to content

Conversation

@cole
Copy link

@cole cole commented Jun 25, 2019

@cole
Copy link
Author

cole commented Jun 25, 2019

Note, I'm getting an error configuring percona (ansible-playbook 2.8.1).

TASK [artefactual.percona : Update the my.cnf] ******************************************************************
fatal: [am-local]: FAILED! => {"changed": false, "msg": "AnsibleError: Unexpected templating type error occurred on (#\n# The MySQL database server configuration file.\n#\n# For explanations see\n# http://dev.mysql.com/doc/mysql/en/server-system-variables.html\n\n[client]\nport        = {{ mysql_port }}\nsocket      = /var/run/mysqld/mysqld.sock\n\n[mysqld_safe]\nsocket      = /var/run/mysqld/mysqld.sock\nnice        = 0\nopen-files-limit = 16384\n\n[mysqld]\n# * Basic Settings\nuser        = mysql\npid-file    = /var/run/mysqld/mysqld.pid\nsocket      = /var/run/mysqld/mysqld.sock\nport        = {{ mysql_port }}\nbasedir     = /usr\ndatadir     = {{ mysql_datadir }}\ntmpdir      = /tmp\n{% if mysql_version_minor < 6 %}\n# language is for pre-5.5. In 5.5 it is an alias for lc_messages_dir.\nlanguage = {{ mysql_language }}\n{% else %}\nlc_messages_dir = {{ mysql_language }}\n{% endif %}\nbind-address = {{ mysql_bind_address }}\nskip-external-locking\n{% if mysql_sql_mode is defined %}\nsql_mode={{ mysql_sql_mode }}\n{% endif %}\n\n# * Fine Tuning\nkey_buffer_size         = {{ mysql_key_buffer }}\nmax_allowed_packet      = {{ mysql_max_allowed_packet }}\nthread_stack            = {{ mysql_thread_stack }}\nthread_cache_size       = {{ mysql_cache_size }}\n{% if mysql_version_minor < 7 %}\nmyisam-recover          = {{ mysql_myisam_recover }}\n{% else %}\nmyisam-recover-options  = {{ mysql_myisam_recover }}\n{% endif %}\nmax_connections         = {{ mysql_max_connections }}\ntable_open_cache        = {{ mysql_table_cache }}\n{% if mysql_version_minor < 7 %}\nthread_concurrency      = {{ mysql_thread_concurrency }}\n{% endif %}\n\n# ** Query Cache Configuration\nquery_cache_limit       = {{ mysql_query_cache_limit }}\nquery_cache_size        = {{ mysql_query_cache_size }}\n\n# ** Logging and Replication\nlog_error = /var/log/mysql/error.log\nlog_warnings = 2\n#general_log_file        = /var/log/mysql/mysql.log\n#general_log             = 1\n#\n#log_slow_queries   = /var/log/mysql/mysql-slow.log\n#long_query_time = 2\n#log-queries-not-using-indexes\n#\n# The following can be used as easy to replay backup logs or for replication.\n#server-id      = 1\n#log_bin            = /var/log/mysql/mysql-bin.log\nexpire_logs_days    = 10\nmax_binlog_size     = 100M\n#binlog_do_db       = include_database_name\n#binlog_ignore_db   = include_database_name\n\n# ** InnoDB\n# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.\n# Read the manual for more InnoDB related options. There are many!\ninnodb_flush_log_at_trx_commit = {{ mysql_innodb_flush_log_at_trx_commit }}\ninnodb_buffer_pool_size = {{ mysql_innodb_buffer_pool_size }}\n{% if mysql_innodb_flush_method != 'fdatasync': %}\ninnodb_flush_method = {{ mysql_innodb_flush_method }}\n{% endif %}\ninnodb_lock_wait_timeout = {{ mysql_innodb_lock_wait_timeout }}\ninnodb_log_buffer_size = {{ mysql_innodb_log_buffer_size }}\ninnodb_log_file_size = {{ mysql_innodb_log_file_size }}\ninnodb_file_per_table = {{ mysql_innodb_file_per_table }}\n\n{% if mysql_optimizer_switch is defined %}\n# Check https://bugs.mysql.com/bug.php?id=69721 for more info\noptimizer_switch = {{ mysql_optimizer_switch }}\n{% endif %}\n\n# ** Security Features\n# Read the manual, too, if you want chroot!\n# chroot = /var/lib/mysql/\n\ncharacter_set_server = {{ mysql_character_set_server }}\ncollation_server = {{ mysql_collation_server }}\ncharacter-set-client-handshake = {{ mysql_character_set_client_handshake }}\n\n[mysqldump]\nquick\nquote-names\nmax_allowed_packet  = {{ mysql_mysqldump_max_allowed_packet }}\n\n[mysql]\n#no-auto-rehash # faster start of mysql but no tab completition\n\n[isamchk]\nkey_buffer      = {{ mysql_isamchk_key_buffer }}\n\n#\n# * IMPORTANT: Additional settings that can override those from this file!\n#   The files must end with '.cnf', otherwise they'll be ignored.\n#\n!includedir /etc/mysql/conf.d/\n): '<' not supported between instances of 'AnsibleUnicode' and 'int'"}

@cole
Copy link
Author

cole commented Jun 25, 2019

Works with Ansible 2.3. I've added a note in 2e0dc5e.

@cole cole changed the title WIP: Add updated remote host install instructions Add updated remote host install instructions Jun 27, 2019
@cole cole requested a review from mamedin June 27, 2019 19:09
hakamine pushed a commit that referenced this pull request Jul 18, 2020
Cherry-picked (and squashed) from:
#109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant