[ansible-project] ansible varibals do not passing to roles that in include_role

2020-07-01 Thread Meir Yanovich
i have this ansible structure its part of large codebase : it seems that when running the main playbook the defaults/main.yml app_type:game don't pass on to the current_version.yml and give error why it doesn't use the default var in defaults/main.yml also when i pass the same variable name

[ansible-project] Need ideas how to reflect progress os ansible job in web page

2020-05-08 Thread Meir Yanovich
hello all i have a simple web page that invokes the ansible job via command line as high level idea how can i reflect some progress from the ansible job to the web page can i set some callbacks or any other idea? I'm not using API I'm running playbook as Linux cli . Thanks -- You received

[ansible-project] ansible error: msg: 'An unhandled exception occurred while templating' in regex_replace

2020-05-07 Thread Meir Yanovich
i have this task which should create random dir download file to the random dir but I keep getting an error on the regexp : --- - name: check if exists hosts: localhost gather_facts: false tasks: - debug: msg:

[ansible-project] Re: ansible include_role syntax problem

2020-05-06 Thread Meir Yanovich
now i facing a new problem as the playbook is in inner directory and the role is in the main dir and it seams ansible don't see it is there way to access the main roles dir ? ( the one under ansible dir ) On Wednesday, May 6, 2020 at 2:38:58 PM UTC+3, Meir Yanovich wrote: > > Thanks

[ansible-project] Re: ansible include_role syntax problem

2020-05-06 Thread Meir Yanovich
Thanks allot for your quick answers and help On Wednesday, May 6, 2020 at 1:20:30 PM UTC+3, Meir Yanovich wrote: > > I try to include_rule but i keep getting errors on the wrong syntax > this is my file structure : > > > ├── roles > │ └── utilities >

Re: [ansible-project] Re: ansible include_role syntax problem

2020-05-06 Thread Meir Yanovich
at 2:12:06 PM UTC+3, Stefan Hornburg (Racke) wrote: > > On 5/6/20 1:06 PM, Meir Yanovich wrote: > > i see , > > in my vars: i will refer to those variable names ? not the module > properties? > > > > Your variable names in the vars block match the module pr

Re: [ansible-project] Re: ansible include_role syntax problem

2020-05-06 Thread Meir Yanovich
i see , in my vars: i will refer to those variable names ? not the module properties? On Wednesday, May 6, 2020 at 2:02:57 PM UTC+3, Stefan Hornburg (Racke) wrote: > > On 5/6/20 12:57 PM, Meir Yanovich wrote: > > Thanks for your fast replay , but now > > when i

[ansible-project] Re: ansible include_role syntax problem

2020-05-06 Thread Meir Yanovich
_facility': 'LOG_USER', '_ansible_tmpdir': '/home/ec2-user/.ansible/tmp/ansible-tmp-1588762539.1880841-18280-15848856136034/', '_ansible_verbosity': 3, '_ansible_version': '2.9.7', 'dest': 'tmp', 'group': 'tmp', 'owner': 'tmp', 'url': 'tmp', 'url_password': 'tmp', 'url_username': 'temp'}

[ansible-project] ansible include_role syntax problem

2020-05-06 Thread Meir Yanovich
I try to include_rule but i keep getting errors on the wrong syntax this is my file structure : ├── roles │ └── utilities │ ├── defaults │ ├── files │ ├── handlers │ ├── meta │ ├── tasks │ │ └── d_pack.yml │ ├──

[ansible-project] Getting : error while evaluating conditional (my_result.stat.exists): 'bool object' has no attribute 'stat' while expcting to be dictionary

2020-05-05 Thread Meir Yanovich
i have this ansible simple playbook : where "/home/ec2-user/test1.txt" exists on disk --- - name: check if exsist hosts: localhost gather_facts: false tasks: - name: Get project name shell: "echo ''" register: name_var

Re: [ansible-project] what is set_when_task_skipped=false replacment in ansible 2.9?

2020-05-04 Thread Meir Yanovich
>> We've recently made some changes to ensure that variables are legal. >>> Likely you just want: >>> >>> `register: login_app` >>> >>> On Mon, May 4, 2020 at 1:16 PM Meir Yanovich >> > wrote: >>> >>>> i have old cod

Re: [ansible-project] what is set_when_task_skipped=false replacment in ansible 2.9?

2020-05-04 Thread Meir Yanovich
ow post seeming to indicate it was a feature. However, > that is incorrect. > > Whatever you expected it to do, never worked to begin with. > > On Mon, May 4, 2020 at 1:50 PM Meir Yanovich > wrote: > >> Then it failed when I remove it and when >> The register var is

Re: [ansible-project] what is set_when_task_skipped=false replacment in ansible 2.9?

2020-05-04 Thread Meir Yanovich
gt; > Whatever you expected it to do, never worked to begin with. > > On Mon, May 4, 2020 at 1:50 PM Meir Yanovich wrote: > >> Then it failed when I remove it and when >> The register var is not set , >> So basically what is the right way to do it ? >> The same fu

Re: [ansible-project] what is set_when_task_skipped=false replacment in ansible 2.9?

2020-05-04 Thread Meir Yanovich
med > `login_app set_when_task_skipped=false` > > `set_when_task_skipped` isn't a feature of Ansible. > > We've recently made some changes to ensure that variables are legal. > Likely you just want: > > `register: login_app` > > On Mon, May 4, 2020 at 1:16 PM Meir Yanovich wrot

[ansible-project] what is set_when_task_skipped=false replacment in ansible 2.9?

2020-05-04 Thread Meir Yanovich
i have old code which use set_when_task_skipped=false in register now it is not supported any more I'm getting on : - name: Find location register: login_app set_when_task_skipped=false when: result.stat.exists == True fatal: [10.0.4.211]: FAILED! => msg: 'Invalid variable name in

[ansible-project] Re: _ec2_instance_facts.py botocore.exceptions.NoCredentialsError: Unable to locate credentials

2020-05-04 Thread Meir Yanovich
://docs.ansible.com/ansible/latest/user_guide/playbooks_debugger.html in fact, I think it is the most helpful link in ansible ecosystem.! as this how you have suddenly eyes and can understand what is going on ! On Saturday, May 2, 2020 at 6:13:41 PM UTC+3, Meir Yanovich wrote: > > hello al

[ansible-project] Re: _ec2_instance_facts.py botocore.exceptions.NoCredentialsError: Unable to locate credentials

2020-05-02 Thread Meir Yanovich
est tags: - packages - name: Ensure botocore and boto3 modules are installed pip: name: [ "boto3", "botocore"] extra_args: "--user" On Saturday, May 2, 2020 at 6:39:30 PM UTC+3, Meir Yanovich wrote: > > after updating ansib

[ansible-project] Re: _ec2_instance_facts.py botocore.exceptions.NoCredentialsError: Unable to locate credentials

2020-05-02 Thread Meir Yanovich
t;/home/ec2-user/app_virtualenv/lib/python3.7/site-packages/botocore/endpoint.py", line 132, in _send_request request = self.create_request(request_dict, operation_model) File "/home/ec2-user/app_virtualenv/lib/python3.7/site-packages/botocore/endpoint.py", line

[ansible-project] _ec2_instance_facts.py botocore.exceptions.NoCredentialsError: Unable to locate credentials

2020-05-02 Thread Meir Yanovich
hello all im upgrading python from 2.7 to python 3.7 and now I'm getting error when using aws API on module : module: ec2_instance_facts - name: Get facts local_action: module: ec2_instance_facts instance_ids: - "xxx" region: "xx" register: instance ansible

[ansible-project] Re: Ansible invoking aws_s3 windows host in block/rescue failed error which hard to understand

2020-04-17 Thread Meir Yanovich
ok i found this question that has been ask before https://github.com/ansible/ansible/issues/34135 can you point me to some example using downloading the backet localy and then copy it to windows ? On Friday, April 17, 2020 at 9:51:56 PM UTC+3, Jordan Borean wrote: > > You can’t run Python

[ansible-project] Re: Ansible invoking aws_s3 windows host in block/rescue failed error which hard to understand

2020-04-17 Thread Meir Yanovich
also why the fall back dosn't work ? why does't it download from the web i mean the rescue block. On Friday, April 17, 2020 at 10:22:18 PM UTC+3, Meir Yanovich wrote: > > didn't know that , > How do i connect to s3 and download file using user/password ? > > > On Friday, A

[ansible-project] Re: Ansible invoking aws_s3 windows host in block/rescue failed error which hard to understand

2020-04-17 Thread Meir Yanovich
didn't know that , How do i connect to s3 and download file using user/password ? On Friday, April 17, 2020 at 9:51:56 PM UTC+3, Jordan Borean wrote: > > You can’t run Python modules on Windows so this was never designed to work > on those hosts. -- You received this message because you are

[ansible-project] Ansible invoking aws_s3 windows host in block/rescue failed error which hard to understand

2020-04-17 Thread Meir Yanovich
this block working fine in Linux ! i trying to use aws_s3 to download package and using fall back to download from web if its fail but im getting error which is hard to understand and pin point the couse of the error : i present only the prablematic code as it is pard of very big ansible