Get-ADDomain -Identity "DC=site,DC=ru" -Server "10.10.10.2" -Credential "site\userlogin"

[Ansible] vault ERROR! Unexpected Exception: Odd-length string

Posted: 17th Июль 2017 by CTAPOMAK in Ansible
Tags:

ansible-vault view environments/prod/credentials.yml

ERROR! Unexpected Exception: Odd-length string

Решение: В файле неправильный перевод строки. Проверяем это:

file environments/prod/credentials.yml
credentials.yml : ASCII text, with CRLF line terminators

Должно быть:
credentials.yml : ASCII text

Пересохраняем в любом редакторе или
find . -type f -exec dos2unix {} \;

ansible-vault view environments/prod/credentials.yml

ERROR! Problem running vault password script / c y g d r i v e / c / g i t / qqqq/ v a u l t . k e y ([Errno 8] Exec format error). If this is not a script, remove the executable bit from the file.

Решение:
chmod 0600 vault.key

[Ansible] приоритет переменных

Posted: 29th Июнь 2017 by CTAPOMAK in Ansible
Tags: , ,

role defaults
inventory vars
inventory group_vars
inventory host_vars
playbook group_vars
playbook host_vars
host facts
play vars
play vars_prompt
play vars_files
registered vars
set_facts
role and include vars
block vars (only for tasks in block)
task vars (only for the task)
extra vars (always win precedence)

[Ansible] service Interactive authentication required.

Posted: 27th Июнь 2017 by CTAPOMAK in Ansible
Tags: , ,

При выполнении плейбука с

Получаем ошибку: Failed to restart httpd.service: Interactive authentication required

Read the rest of this entry »

[ELK] filebeat json

Posted: 27th Июнь 2017 by CTAPOMAK in ELK
Tags: ,

vim /etc/filebeat/filebeat.yml

 

[ELK] filebeat multiline Tomcat

Posted: 27th Июнь 2017 by CTAPOMAK in ELK
Tags: ,

vim /etc/filebeat/filebeat.yml

 

Start-Process powershell.exe -Credential "domain\user"

get-adobject -Filter 'ObjectClass -eq "group"' | Select-String "GroupName"

--пользака

get-adobject -Filter 'ObjectClass -eq "user"' | Select-String "userName"

AD администрирование в PowerShell

  • Open Control Panel -> Programs and Features -> Turn On/Off Windows Features
  • Find "Remote Server Administration Tools" and expand it
  • Find "Role Administration Tools" and expand it
  • Find "AD DS And AD LDS Tools" and expand it
  • Check the box next to "Active Directory Module For Windows PowerShell".
  • Click OK and allow Windows to install the feature