Merge "Fix deployment when using Ansible 2.6.5"
This commit is contained in:
commit
b7696ca200
@ -102,8 +102,14 @@
|
||||
when: lookup('env', 'mysql_pass') | length > 0
|
||||
no_log: true
|
||||
|
||||
- name: Setting MySQL socket fact
|
||||
set_fact:
|
||||
mysql_socket_path: "/var/run/{% if ansible_distribution | lower is search('suse') %}mysql/mysql.sock{% else %}mysqld/mysqld.sock{% endif %}"
|
||||
when: ansible_version.full is version_compare('2.6.5', '>=')
|
||||
|
||||
- name: "MySQL - Creating DB"
|
||||
mysql_db:
|
||||
login_unix_socket: "{{ mysql_socket_path | default(omit) }}"
|
||||
name: "{{ ironic.database.name }}"
|
||||
state: present
|
||||
encoding: utf8
|
||||
@ -114,6 +120,7 @@
|
||||
|
||||
- name: "MySQL - Creating user for Ironic"
|
||||
mysql_user:
|
||||
login_unix_socket: "{{ mysql_socket_path | default(omit) }}"
|
||||
name: "{{ ironic.database.username }}"
|
||||
password: "{{ ironic.database.password }}"
|
||||
priv: "{{ ironic.database.name }}.*:ALL"
|
||||
|
@ -13,8 +13,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
---
|
||||
- name: Setting MySQL socket fact
|
||||
set_fact:
|
||||
mysql_socket_path: "/var/run/{% if ansible_distribution | lower is search('suse') %}mysql/mysql.sock{% else %}mysqld/mysqld.sock{% endif %}"
|
||||
when: ansible_version.full is version_compare('2.6.5', '>=')
|
||||
|
||||
- name: "MySQL - Create database"
|
||||
mysql_db:
|
||||
login_unix_socket: "{{ mysql_socket_path | default(omit) }}"
|
||||
login_user: "{{ mysql_username }}"
|
||||
login_password: "{{ mysql_password }}"
|
||||
name: "{{ ironic_inspector.database.name }}"
|
||||
@ -24,6 +30,7 @@
|
||||
|
||||
- name: "MySQL - Create user for inspector"
|
||||
mysql_user:
|
||||
login_unix_socket: "{{ mysql_socket_path | default(omit) }}"
|
||||
login_user: "{{ mysql_username }}"
|
||||
login_password: "{{ mysql_password }}"
|
||||
name: "{{ ironic_inspector.database.username }}"
|
||||
|
@ -71,8 +71,14 @@
|
||||
when: lookup('env', 'mysql_pass') | length > 0
|
||||
no_log: true
|
||||
|
||||
- name: Setting MySQL socket fact
|
||||
set_fact:
|
||||
mysql_socket_path: "/var/run/{% if ansible_distribution | lower is search('suse') %}mysql/mysql.sock{% else %}mysqld/mysqld.sock{% endif %}"
|
||||
when: ansible_version.full is version_compare('2.6.5', '>=')
|
||||
|
||||
- name: "MySQL - Creating DB"
|
||||
mysql_db:
|
||||
login_unix_socket: "{{ mysql_socket_path | default(omit) }}"
|
||||
name: "{{ keystone.database.name }}"
|
||||
state: present
|
||||
encoding: utf8
|
||||
@ -83,6 +89,7 @@
|
||||
|
||||
- name: "MySQL - Creating user for keystone"
|
||||
mysql_user:
|
||||
login_unix_socket: "{{ mysql_socket_path | default(omit) }}"
|
||||
name: "{{ keystone.database.username }}"
|
||||
password: "{{ keystone.database.password }}"
|
||||
priv: "{{ keystone.database.name }}.*:ALL"
|
||||
|
Loading…
Reference in New Issue
Block a user