Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win_iis_webapppool cannot add multiple env vars #566

Open
kossioni opened this issue May 24, 2024 · 0 comments
Open

win_iis_webapppool cannot add multiple env vars #566

kossioni opened this issue May 24, 2024 · 0 comments

Comments

@kossioni
Copy link

cannot add multiple env vars only 1 accepted using:

- name: Create IIS Application Pool
  community.windows.win_iis_webapppool:
    name: MouzakisAnsibleAppPool
    state: present
    attributes:
      managedPipelineMode: Classic
      queueLength: 2000
      processModel.identityType: SpecificUser
      processModel.userName: '{{ ansible_user }}'
      processModel.password: '{{ ansible_password }}'
      processModel.loadUserProfile: true
      processModel.maxProcesses: 20
      environmentVariables:
        - name: foo
          value: bar

From the above I see the env var added but I cannot specify a list of them no matter what I try...

for example:

TRY 1

- name: Create IIS Application Pool
  community.windows.win_iis_webapppool:
    name: MouzakisAnsibleAppPool
    state: present
    attributes:
      managedPipelineMode: Classic
      queueLength: 2000
      processModel.identityType: SpecificUser
      processModel.userName: '{{ ansible_user }}'
      processModel.password: '{{ ansible_password }}'
      processModel.loadUserProfile: true
      processModel.maxProcesses: 20
      environmentVariables:
        - name: foo
          value: bar
        - name: foo2
           value: bar2

The above doesn't work....

If I try to add multiple environmentVariables attributes only the last gets applied for example:

TRY 2

- name: Create IIS Application Pool
  community.windows.win_iis_webapppool:
    name: MouzakisAnsibleAppPool
    state: present
    attributes:
      managedPipelineMode: Classic
      queueLength: 2000
      processModel.identityType: SpecificUser
      processModel.userName: '{{ ansible_user }}'
      processModel.password: '{{ ansible_password }}'
      processModel.loadUserProfile: true
      processModel.maxProcesses: 20
      environmentVariables:
        - name: foo
          value: bar
      environmentVariables:
        - name: last1
          value: only_applies

How can I add multiple env vars?

@kossioni kossioni changed the title win_iis_webapppool win_iis_webapppool cannot add multiple env vars May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant