Rapid
Nop
Rapid
I added some debug to see maybe values are different but the condition should be true
Max
даже может он сопротивлялся. хотя, если ты такое пишешь, наверное знаешь о чем говоришь.
Rapid
Well, could you please show it out?
Are you there now? Sorry for delay :p
Rapid
https://pastebin.com/kmqTc7Y3
Sergey
https://pastebin.com/kmqTc7Y3
Jesus Christ, man...... So. What task ignores you completely?
Rapid
Inside the block, CopyFile (The Helpers/CopyFile include_role) is being ignored
Sergey
Yeap. k. What's the version of your Ansible installation?
Sergey
ansible —version
Sergey
?
Rapid
2.7.9
Rapid
Using VSCode Ansible integration to run it on docker and run those playbooks
Sergey
O_o
Sergey
Have you searched through issues in Ansible's GitHub?
Rapid
I just talked to people on freenode Ansible, the developers are there, they are confused aswell :-D
Rapid
like, big contributers are over there aswell
Rapid
and he says it doesn't happen for him on Devel branch and 2.7.9 stable
Rapid
so I'll just remove the related company stuff I have there, and create a github project so they can take a look at it
Rapid
but yeah, its very weird - the case is this: 1. I have a block that has 2 tasks 2. First task is include_role 3. Second task is anything else... The first task with the include_role doesnt get executed lol
Rapid
Only inside block it happens.
Sergey
Seems like you have "when on when". I'm really not sure whether this should work at all.
Rapid
What do you mean when on when?
Sergey
I mean the included role has "when" inside it, also the whole block has also "when" condition.
Sergey
Anyway. Let me be the yellow rubber duck for a while. Could you please explain me what should Helper/CopyFile do?
Sergey
Do you want to ensure that file is there or ....?
Timur
Inside the block, CopyFile (The Helpers/CopyFile include_role) is being ignored
Do you really have a role named ‘Helpers/CopyFile’?
Дивопсина сутулая породистая
Хао всем, кто может подсказать как имя хоста из инвентори использовать как переменную?
Vladislav 👻
ansible_hostname и т.п.
Дивопсина сутулая породистая
Кк
Дивопсина сутулая породистая
спс
Дивопсина сутулая породистая
не подумал сходу
Vladislav 👻
В пинге/сетапе можно посмотреть, какие есть
Victor
Подскажите доки для обучения. По возможности подтянуть знания от нуля до огтшщк
Victor
Может курс какой-то хороший
Sergei
ищи в группе, тут полно pdf выкладывали
Rapid
Do you want to ensure that file is there or ....?
Heleprs/CopyFile checks if a file exist, and if it doesn't then it copies it.
Rapid
Do you really have a role named ‘Helpers/CopyFile’?
The roel name is CopyFile and its inside Helpers folder so yeah
Sergey
Heleprs/CopyFile checks if a file exist, and if it doesn't then it copies it.
Module itself does not copy file, you don't have to carry out checks yourself.
Rapid
Really?
Александр
Really?
um...yeah. idempotency and stuff. kinda whole point of ansible is that it only does what haven't been done before. you can just use copy without any manual checks.
Rapid
Okay, well I still rather have it in it's own role, maybe in the future ill decide to add some other checks and validations
Rapid
so I like to have those stuff seperated
Anton
словил интересный баг, пытаюсь работать с сертификатами на винде, но не могу оперировать их хешами ибо если передавать в ансибл хеш как переменную, то интерпертируеются она с неким лишним символом вначале, выглядит вот так:
Dr. L.S.Dee
Интересно. Вчера подобное же мельком видел, только не помню, где.
Sergey
поясните :)
Переход в режим просмотра, переход в просмотр hex-кодов
Kirill
поясните :)
Да и в notepad++ можно посмотреть
Kirill
В любом hex редакторе
Kirill
А то в следующий раз не возьмётся и отчекрыжит один полезный символ
Dr. L.S.Dee
Сначала надо разобраться, откуда берётся)
KISS. Задача не стоит разобраться, откуда этот символ, задача стоит передать хэш серта без левых символов дальше. Будет повторяться - будем копать.
Dr. L.S.Dee
А еще я вспоминаю, что видел я вчера это в выводе csptest от КриптоПро.
Anton
победил, действительно какая то нечесть присуствовала, в hex была видна, иным способом нет. почистил и полечилось.
Anton
Это копипаста? Откуда копировал?
точно не вспомню, но скорее всего из доки этого модуля https://docs.ansible.com/ansible/2.4/win_iis_webbinding_module.html
Dr. L.S.Dee
точно не вспомню, но скорее всего из доки этого модуля https://docs.ansible.com/ansible/2.4/win_iis_webbinding_module.html
Но дока ни при чем вроде как. Я, конечно, ничего не понимаю в этом вашем красноглазии, но прочтение по диагонали вкупе со всем остальным, о чем упоминалось не раз в чатике, заставляет меня полагать, что в модуль должен передаваться уже взятый откуда-то хэш. А откуда и как вы его взяли?
Dr. L.S.Dee
Потому что через командлет Get-PfxCertificate, например, доступный уже в WMF3.0 (ниже не держу, SCCM не очень работает с такими старыми клиентами) хэш берется вроде как чистенький.
Dr. L.S.Dee
Это из файла я щас навскидку дернул.
Dr. L.S.Dee
Надо из хранилища взять откуда-то. Откуда бы?..
Dr. L.S.Dee
(Get-PfxCertificate -FilePath C:\Users\Administrator\Desktop\404226875916117714656602596859109066530222356329.cer).Thumbprint - чистая строка без левой фигни.
Ilia
(gci Cert:\LocalMachine\My).Thumbprint ?
Dr. L.S.Dee
А вот, кстати, если открыть сертификат, скопировать отпечаток, вставить в блокнотик или в командную строку, то символ вначале появляется, только что убедился.
Dr. L.S.Dee
(gci Cert:\LocalMachine\My).Thumbprint ?
Тоже работает. Тоже все чистенько.
Dr. L.S.Dee
А то в следующий раз не возьмётся и отчекрыжит один полезный символ
Ну или регуляркой резать (хотя на пошике это концентрированная мерзость), оставлять только Aa - Zz и 0-9.
Rapid
If I include_vars in my main playbook. ` - include_vars: dir: configuration file: "InstallSettings.json" name: config ` I can just config['keyname'] from anywhere in roles and all of them know of those vars?
V.
товарищи, а подскажите как правильнее инициализировать бд постгрес, command же не индемпотентен?