Has anyone already dealt with this? Things like enable sa user, enable tcp pipes etc.
Thanks,
changed_when: False ),then only run the
then i
#Change to Mixed Modebit when the login mode isn't what you expect. You could also then notify a handler to restart SQL Express to pick up the changed login mode.
$s.Settings.LoginMode = [Microsoft.SqlServer.Management.SMO.ServerLoginMode]::Mixed
# Make the changes
$srv.Alter()
- name: grant automation user access to the new cert
script: grantRightsToMyCerts.ps1 {{ signing_cert_thumbprint }}"
register: grant_results
- name: debug grant_results
debug: var=grant_results
- name: set grant result fact
set_fact:
grant_status: "{{ grant_results.stdout_lines[2] }}"
- name: set grant result fact avoiding spaces
set_fact:
grant_status: "{{ grant_results.stdout_lines[2]|trim }}"
- name: Run Check SQL TCP Script
win_shell: C:\Script\check_sql_tcp.ps1
register: check_sql_tcp
- name: Run Set SQL TCP Script
win_shell: C:\Script\set_sql_tcp.ps1
register: check_sql_tcp
when:
- check_sql_tcp.stdout_lines[0] != "True"
notify: Restart MSSQL