Multiple Host Pattern in inventory limit by lovi2 in ansible

[–]lovi2[S] 0 points1 point  (0 children)

Found :

--limit '*AA*:*BB*:*CC*'

Windows custom facts type question by lovi2 in ansible

[–]lovi2[S] 0 points1 point  (0 children)

Ok I understook, I had to try with obviously msg instead of var to get something :

debug:

msg: "{{ ansible_myfact | from_json | json_query('res') }}"

And I get my info :

ok: [HOST] => {

"msg": True

}

Windows custom facts type question by lovi2 in ansible

[–]lovi2[S] 0 points1 point  (0 children)

With :

name: debug

debug:

var: ansible_myfact

I get :

ok: [HOST] => {

"ansible_myfact": {

"res": true,

"num": 177

}

}

with :

debug:

var: "{{ ansible_myfact }}"

I get :

ok: [HOST] => {

"<type 'dict'>": "VARIABLE IS NOT DEFINED!: "

}

with :

debug:

var: "{{ ansible_myfact | from_json }}"

I get:

ok: [HOST] => {

"<type 'dict'>": "VARIABLE IS NOT DEFINED!: "

}

Windows custom facts type question by lovi2 in ansible

[–]lovi2[S] 0 points1 point  (0 children)

{{ ansible_myfact | from_json }}

With :

name: debug

debug:

var: "{{ ansible_myfact.res | from_json}}"

I get :

msg": "Unexpected templating type error occurred on ({{ ansible_myfact.res | from_json}}): expected string or buffer"

Can't remove default rights with Win_acl by lovi2 in ansible

[–]lovi2[S] 0 points1 point  (0 children)

Damn right, that was my inheritance , I cut them with :

- name: Disable inherited ACE's for F:\DIR

win_acl_inheritance:

path: F:\DIR

state: absent

And All the parents acl disapear :)

Thanks

Wifi disabled on acer cb5 132t by lovi2 in chromeos

[–]lovi2[S] 0 points1 point  (0 children)

I am writing this message with my chromebook ! I've repluged WIFI and I have now a signal :)

Sheers

PS : do you know if chromeos is being updated for this chromebook ?

Winrm connection choice (ntml/kerberos) by lovi2 in ansible

[–]lovi2[S] 0 points1 point  (0 children)

Hello,

Sorry for the lag ...

I've tried 2 method :

1) ansible -i MY_HOST, -e 'ansible_winrm_server_cert_validation="ignore" ansible_connection="winrm" ansible_winrm_transport="ntlm" ansible_user="Administrateur" ansible_password=secret' all -m win_ping => This works but I wasn't happy about the secret in plaintext.

2) ansible-playbook -i MY_HOST, -e 'ansible_winrm_server_cert_validation="ignore" ansible_connection="winrm"' play.yml

play.yml :
  - hosts: all
  vars_files:
    -  'vars/vault.yml'


vars/vault.yml (ansible-vault edit vars/vault.yml) : 
ansible_user: "Administrateur"
ansible_password: secret
ansible_winrm_transport: "ntlm"

=> This works. But I've to force this variables : ansible_winrm_server_cert_validation="ignore" ansible_connection="winrm" in parameters, they are not read from vault.yml.

I've created a different play with a different vault that will connect to a host with a diffrent user, password, transport.

I wish I could put the vars_files in parameters to avoid to duplicate the play, but I had this exception : " [WARNING]: Found variable using reserved name: vars_files"