Skip to content

Commit

Permalink
special char handling for passwords on imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkayontour committed Mar 1, 2024
1 parent 998c857 commit 975d10a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion roles/icinga2/tasks/features/idomysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{% if icinga2_dict_features.idomysql.ssl_cipher is defined %} --ssl-cipher "{{ icinga2_dict_features.idomysql.ssl_cipher }}" {%- endif %}
{% if icinga2_dict_features.idomysql.extra_options is defined %} {{ icinga2_dict_features.idomysql.extra_options }} {%- endif %}
-u "{{ icinga2_dict_features.idomysql.user | default('icinga2') }}"
-p"{{ icinga2_dict_features.idomysql.password }}"
-p'{{ icinga2_dict_features.idomysql.password }}'
"{{ icinga2_dict_features.idomysql.database | default('icinga2') }}"
- name: MySQL check for IDO schema
Expand Down
2 changes: 1 addition & 1 deletion roles/icinga2/tasks/features/idopgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- name: build psql command
set_fact:
psqlcmd: >-
PGPASSWORD="{{ icinga2_dict_features.idopgsql.password }}"
PGPASSWORD='{{ icinga2_dict_features.idopgsql.password }}'
psql
"host={{ icinga2_dict_features.idopgsql.host| default('localhost') }}
port={{ icinga2_dict_features.idopgsql.port| default('5432') }}
Expand Down
2 changes: 1 addition & 1 deletion roles/icingadb/tasks/manage_schema_mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% if icingadb_database_cert is defined %} --ssl-cert "{{ icingadb_database_cert }}" {%- endif %}
{% if icingadb_database_key is defined %} --ssl-key "{{ icingadb_database_key }}" {%- endif %}
-u "{{ icingadb_database_user | default('icingadb') }}"
-p"{{ icingadb_database_password }}"
-p'{{ icingadb_database_password }}'
"{{ icingadb_database_name | default('icingadb') }}"
- name: MySQL check for IcingaDB schema
Expand Down
2 changes: 1 addition & 1 deletion roles/icingadb/tasks/manage_schema_pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- name: Build pgsql command
ansible.builtin.set_fact:
_tmp_pgsqlcmd: >-
PGPASSWORD="{{ icingadb_database_password }}"
PGPASSWORD='{{ icingadb_database_password }}'
psql
"{% if icingadb_database_host %} host="{{ icingadb_database_host }}" {%- endif %}
{% if icingadb_database_port is defined %} port={{ icingadb_database_port }} {%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion roles/icingaweb2/tasks/manage_icingaweb_mysql_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{% if icingaweb2_db['ssl_cipher'] is defined %} --ssl-cipher "{{ icingaweb2_db['ssl_cipher'] }}" {%- endif %}
{% if icingaweb2_db['ssl_extra_options'] is defined %} {{ icingaweb2_db['ssl_extra_options'] }} {%- endif %}
-u "{{ icingaweb2_priv_db_user | default(icingaweb2_db['user']) }}"
-p"{{ icingaweb2_priv_db_password | default(icingaweb2_db['password']) }}"
-p'{{ icingaweb2_priv_db_password | default(icingaweb2_db['password']) }}'
"{{ icingaweb2_db['name'] }}"
- name: MySQL check for icingaweb db schema
Expand Down
2 changes: 1 addition & 1 deletion roles/icingaweb2/tasks/manage_icingaweb_pgsql_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- name: Build psql command
ansible.builtin.set_fact:
_tmp_pgsqlcmd: >-
PGPASSWORD="{{ icingaweb2_priv_db_password | default(icingaweb2_db['password']) }}"
PGPASSWORD='{{ icingaweb2_priv_db_password | default(icingaweb2_db['password']) }}'
psql
"host={{ icingaweb2_db['host'] }}
{% if icingaweb2_db['port'] is defined %} port={{ icingaweb2_db['port'] }} {%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion roles/icingaweb2/tasks/manage_mysql_imports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{% if _db['ssl_cipher'] is defined %} --ssl-cipher "{{ _db['ssl_cipher'] }}" {%- endif %}
{% if _db['ssl_extra_options'] is defined %} {{ _db['ssl_extra_options'] }} {%- endif %}
-u "{{ _db['user'] }}"
-p"{{ _db['password'] }}"
-p'{{ _db['password'] }}'
"{{ _db['name'] }}"
- name: MySQL check for db schema
Expand Down

0 comments on commit 975d10a

Please sign in to comment.