Deploy artifact to multiple azure web apps using Ansible

I have jar file that i want to deploy to diffrent hosts using ansible
so i configured my inventory with the domains of my webapps

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>[webapps]
domainofwebapp1.com resource_group=RG web_app=WEBAPPname
domainofwebapp2.com resource_group=RG web_app=WEBAPPname
domainofwebapp3.com resource_group=RG web_app=WEBAPPname
domainofwebapp4.com resource_group=RG web_app=WEBAPPname
</code>
<code>[webapps] domainofwebapp1.com resource_group=RG web_app=WEBAPPname domainofwebapp2.com resource_group=RG web_app=WEBAPPname domainofwebapp3.com resource_group=RG web_app=WEBAPPname domainofwebapp4.com resource_group=RG web_app=WEBAPPname </code>
[webapps]
domainofwebapp1.com resource_group=RG web_app=WEBAPPname
domainofwebapp2.com resource_group=RG web_app=WEBAPPname
domainofwebapp3.com resource_group=RG web_app=WEBAPPname
domainofwebapp4.com resource_group=RG web_app=WEBAPPname

than i created a playbook to deploy via Az deploy as follow :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>- name: Deploy JAR to Azure Web App
hosts: webapps
gather_facts: no
tasks:
- name: Run Azure login command
shell: >
az login --service-principal -u "clientID" -p "SECRET" --tenant "TEnantID"
- name: Deploy JAR file to Azure Web App
shell: >
az webapp deploy --resource-group {{ hostvars[inventory_hostname].resource_group }} --name {{ hostvars[inventory_hostname].web_app }} --src-path "/path/to/your/local/jar/file.jar" --type jar
</code>
<code>- name: Deploy JAR to Azure Web App hosts: webapps gather_facts: no tasks: - name: Run Azure login command shell: > az login --service-principal -u "clientID" -p "SECRET" --tenant "TEnantID" - name: Deploy JAR file to Azure Web App shell: > az webapp deploy --resource-group {{ hostvars[inventory_hostname].resource_group }} --name {{ hostvars[inventory_hostname].web_app }} --src-path "/path/to/your/local/jar/file.jar" --type jar </code>
- name: Deploy JAR to Azure Web App
  hosts: webapps
  gather_facts: no
  tasks:
    - name: Run Azure login command
      shell: >
        az login --service-principal -u "clientID" -p "SECRET" --tenant "TEnantID"

    - name: Deploy JAR file to Azure Web App
      shell: >
        az webapp deploy --resource-group {{ hostvars[inventory_hostname].resource_group }} --name {{ hostvars[inventory_hostname].web_app }} --src-path "/path/to/your/local/jar/file.jar" --type jar

also i did configure ~/.azure/credentials

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>[default]
subscription_id=<subscription_id>
client_id=<service_principal_app_id>
secret=<service_principal_password>
tenant=<service_principal_tenant_id>
</code>
<code>[default] subscription_id=<subscription_id> client_id=<service_principal_app_id> secret=<service_principal_password> tenant=<service_principal_tenant_id> </code>
[default]
subscription_id=<subscription_id>
client_id=<service_principal_app_id>
secret=<service_principal_password>
tenant=<service_principal_tenant_id>

Yet i always get this error
domainofwebapp1.com | UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh: ssh: connect to host domainofwebapp1.com port 22: Connection timed out”,
“unreachable”: true
}

I don’t want to use SSH i want to configure it to not use ssh and use Service Principle instead

i tried also the az.collection azure_rm_webapp: module yet i couldn’ deploy with it to the webapp it only help to create the web app .

CAN YOU HELP ME PLEASE TO DEPLOY SUCCEFULLY TO A GROUP OF AZURE WEBAPPS USING ANSIBLE .

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật