Hi
According to the documentation, for SharePointDCS modules to work, we have
to specify PsDscRunAsCredentials in win_dcs module:
- name: set shell admin for farmaccount
win_dsc:
resource_name: SPShellAdmins
IsSingleInstance: "Yes"
MembersToInclude: "farmadmin_user"
I hope I got all:
(venv_ansible)[userid@ansiblehost ~/ansible_test]$ pip list
ansible (2.4.3.0)
asn1crypto (0.24.0)
bcrypt (3.1.4)
certifi (2018.1.18)
cffi (1.11.5)
chardet (3.0.4)
cryptography (2.1.4)
enum34 (1.1.6)
idna (2.6)
ipaddress (1.0.19)
Jinja2 (2.10)
MarkupSafe (1.0)
ntlm-auth (1.0.6)
It isn't a transient error, it occurs always in this setup with the
mentioned module versions. Tested with different windows versions.
Everything is working find with your suggestions:
ansible_port=5986
and also with
ansible_winrm_message_encryption=never
So problem solved for me, thank you
Hi there
Never had this error before, and also Google could not help me so far.
When I create a new virtualenv and install pip modules, I get the mentioned
error when I try to manage Windows hosts with Ansible.
I'm on debian 8.9.
Steps to reproduce:
cd ~
virtualenv venv_ansible
.
I don't fully agree with you.
Because I set "applicationname" to "{{ APPLICATIONNAME }}" when I call the
role in the playbook:
- include_role:
name: role1
vars:
applicationname: "{{ APPLICATIONNAME }}"
description: "{{ DESCRIPTION }}"
Problem is, that "{{ APPLICATIONNAME }}"
Hi Kai
You used the variable in a playbook, maybe that works. But I want to make
sure that the role is not being executed when someone forgets to set the
variable.
So the trick here is: "{{ APPLICATIONNAME }}" is not set.
Normaly this is a variable in vars/app1.yml
Here is the full code:
I was too fast with my answer.
/roles/defaults/main.yml
---
applicationname: ""
description: ""
required_vars:
- applicationname
This workes:
- name: check required vars empty
fail: msg="Variable '{{ item }}' is empty"
when: vars[item] == ""
with_items: "{{ required_vars }}"
This
Perfect, works like a charm, thank you so much!
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-project+unsubscr...@googlegroups.com.
To post to this
Not sure, but maybe you run into this problem:
https://github.com/ansible/ansible/issues/8603
Use a different variable, or what we do:
group_vars are in capital letter. Vars within playbooks or roles are in
lowercases.
--
You received this message because you are subscribed to the Google
This is my example playbook:
---
- name: play1
hosts: app1
vars_files:
- "vars/app1.yml"
tasks:
- include_role:
name: role1
vars:
applicationname: "{{ APPLICATIONNAME }}"
description: "{{ DESCRIPTION }}"
Now in the role, I want to make sure applicationname is
10 matches
Mail list logo