# Ansible Project

**URL:** https://forum.ansible.com/c/archives/ansible-project/30.md?page=124

[Latest](https://forum.ansible.com/latest.md) · [Categories](https://forum.ansible.com/categories.md) · [Tags](https://forum.ansible.com/tags.md)

**Page:** 125

---

## [Is it possible to use jinja withing Ansible playbook yml file](https://forum.ansible.com/t/is-it-possible-to-use-jinja-withing-ansible-playbook-yml-file/32988)

<div class="topic-metadata">

**Author:** [@Aidan\_Wong](https://forum.ansible.com/u/Aidan_Wong)\
**Replies:** 1\
**Last updated:** [May 20, 2020, 6:46pm UTC](https://forum.ansible.com/t/is-it-possible-to-use-jinja-withing-ansible-playbook-yml-file/32988 "2020-05-20T18:46:47Z")

</div>

Hi Is it possible to write jinja “if” conditionals within a playbook like so? If not can someone suggest an alternative? \` name: Deploy the VMs without an anti-affinity group. cs\_instance: zone: “{{ cs\_zone }}” ap…

---

## [Create list in playbook (Fortigate automation)](https://forum.ansible.com/t/create-list-in-playbook-fortigate-automation/32985)

<div class="topic-metadata">

**Author:** [@Luis\_Arizaga](https://forum.ansible.com/u/Luis_Arizaga)\
**Replies:** 0\
**Last updated:** [May 20, 2020, 3:26pm UTC](https://forum.ansible.com/t/create-list-in-playbook-fortigate-automation/32985 "2020-05-20T15:26:01Z")

</div>

Hi everybody, I’m using Ansible to automate Fortigate Firewalls provisioning and I’m having the following problems. I have a playbook that first creates a couple of object addresses using one module (task Configure on…

---

## [OpenBSD network\_cli](https://forum.ansible.com/t/openbsd-network-cli/32984)

<div class="topic-metadata">

**Author:** [@John\_D1](https://forum.ansible.com/u/John_D1)\
**Replies:** 0\
**Last updated:** [May 20, 2020, 11:36am UTC](https://forum.ansible.com/t/openbsd-network-cli/32984 "2020-05-20T11:36:36Z")

</div>

I’ve installed the ansible pkg via pkg\_add. I cannot get the ansible network\_cli module to work in OpenBSD. Tried in version 6.6 and also 6.7 and both hang at “using connection plugin network\_cli”. It never times out, ha…

---

## [how to run an if/else test in a task](https://forum.ansible.com/t/how-to-run-an-if-else-test-in-a-task/32973)

<div class="topic-metadata">

**Author:** [@hieronymus](https://forum.ansible.com/u/hieronymus)\
**Replies:** 4\
**Last updated:** [May 20, 2020, 10:38am UTC](https://forum.ansible.com/t/how-to-run-an-if-else-test-in-a-task/32973 "2020-05-20T10:38:34Z")

</div>

Hi Teams, I’m looking for to do a test before to execute a task. I need to checkup if my computer has already joined the domain before to join it. otherwise, the adcli will failed. When computer isn’t in domain, the k…

---

## [Ansible to execute sql script on azure sql(paas)-- sql-cmd](https://forum.ansible.com/t/ansible-to-execute-sql-script-on-azure-sql-paas-sql-cmd/32977)

<div class="topic-metadata">

**Author:** [@vinod\_devops](https://forum.ansible.com/u/vinod_devops)\
**Replies:** 0\
**Last updated:** [May 20, 2020, 5:49am UTC](https://forum.ansible.com/t/ansible-to-execute-sql-script-on-azure-sql-paas-sql-cmd/32977 "2020-05-20T05:49:29Z")

</div>

Hi guys, I am working on ansible task to execute sql script on azure sql . for Iaas I am using sql-cmd to execute sql script remoely. My question how do I execute sql script on azure sql from ansible. Thanks, vinod

---

## [how to execute a handler  if a file is found](https://forum.ansible.com/t/how-to-execute-a-handler-if-a-file-is-found/32976)

<div class="topic-metadata">

**Author:** [@Dan\_Idar](https://forum.ansible.com/u/Dan_Idar)\
**Replies:** 2\
**Last updated:** [May 19, 2020, 8:46pm UTC](https://forum.ansible.com/t/how-to-execute-a-handler-if-a-file-is-found/32976 "2020-05-19T20:46:36Z")

</div>

Hello I would like to be able to find the files that are bigger than a certain dize and then restart a service if this happens because it mean the rotation is not working after the configurtion update the find module d…

---

## [Can't add new postgresql\_hba records using postgresql\_hba module](https://forum.ansible.com/t/cant-add-new-postgresql-hba-records-using-postgresql-hba-module/32966)

<div class="topic-metadata">

**Author:** [@Ikhsan\_Faruqi](https://forum.ansible.com/u/Ikhsan_Faruqi)\
**Replies:** 6\
**Last updated:** [May 19, 2020, 2:54pm UTC](https://forum.ansible.com/t/cant-add-new-postgresql-hba-records-using-postgresql-hba-module/32966 "2020-05-19T14:54:01Z")

</div>

Hi, I trying to add new hba\_records using pg\_hba\_module but got this error: \` failed: \[pg-12\] (item={‘hba\_database’: ‘test-db’, ‘hba\_users’: ‘johndoe’, ‘hba\_connection\_type’: ‘host’, ‘hba\_source’: ‘0.0.0.0/0’, ‘hba\_met…

---

## [Copy a folder from remote host to local using Ansible.](https://forum.ansible.com/t/copy-a-folder-from-remote-host-to-local-using-ansible/32970)

<div class="topic-metadata">

**Author:** [@Divya\_Punna](https://forum.ansible.com/u/Divya_Punna)\
**Replies:** 2\
**Last updated:** [May 19, 2020, 1:55pm UTC](https://forum.ansible.com/t/copy-a-folder-from-remote-host-to-local-using-ansible/32970 "2020-05-19T13:55:30Z")

</div>

Can anyone help/suggest on how to copy a folder from remote host to local using Ansible? Appreciate any quick help on this

---

## [Install pmm-client using ansible playbook](https://forum.ansible.com/t/install-pmm-client-using-ansible-playbook/32967)

<div class="topic-metadata">

**Author:** [@kaoutar\_idbelkacem](https://forum.ansible.com/u/kaoutar_idbelkacem)\
**Replies:** 0\
**Last updated:** [May 19, 2020, 10:54am UTC](https://forum.ansible.com/t/install-pmm-client-using-ansible-playbook/32967 "2020-05-19T10:54:48Z")

</div>

Hi every one in the group :slight\_smile: I m traying to deploye pmm-client on my machine using this play book hosts: all become: yes vars: pmm\_client\_install: true pmm\_client\_enabled: true pmm\_client\_server\_hos…

---

## [how to install a specific KB from windows update](https://forum.ansible.com/t/how-to-install-a-specific-kb-from-windows-update/32955)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 6\
**Last updated:** [May 18, 2020, 10:59pm UTC](https://forum.ansible.com/t/how-to-install-a-specific-kb-from-windows-update/32955 "2020-05-18T22:59:17Z")

</div>

I am trying to install a specific update KB4541509 but it is not getting installed. I got the playbook running but not getting installed here is from the ansible win log 2020-05-17 10:22:51Z Creating Windows Update se…

---

## [Create folder using command line](https://forum.ansible.com/t/create-folder-using-command-line/32962)

<div class="topic-metadata">

**Author:** [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Replies:** 4\
**Last updated:** [May 18, 2020, 9:39pm UTC](https://forum.ansible.com/t/create-folder-using-command-line/32962 "2020-05-18T21:39:23Z")

</div>

Hi, I’m trying to create folder structure on HDFS storage. I have 3 main folders and each has subfolders. Thank you. Configuration file: companies: - company\_folder\_name: /ibm department: - it …

---

## [How to pass 'hosts' value to an imported or included playbook?](https://forum.ansible.com/t/how-to-pass-hosts-value-to-an-imported-or-included-playbook/32963)

<div class="topic-metadata">

**Author:** [@Peter\_Bi](https://forum.ansible.com/u/Peter_Bi)\
**Replies:** 1\
**Last updated:** [May 18, 2020, 7:38pm UTC](https://forum.ansible.com/t/how-to-pass-hosts-value-to-an-imported-or-included-playbook/32963 "2020-05-18T19:38:19Z")

</div>

I’ve playbook A to include roles to conduct an operation. Now I want to create playbook B to import/include playbook A but want to pass ‘hosts’ value to A. In other words, I want to make A to work dynamically with differ…

---

## [ansible date and time variable](https://forum.ansible.com/t/ansible-date-and-time-variable/32961)

<div class="topic-metadata">

**Author:** [@Om\_Prasad\_Reddy\_Sura](https://forum.ansible.com/u/Om_Prasad_Reddy_Sura)\
**Replies:** 2\
**Last updated:** [May 18, 2020, 4:10pm UTC](https://forum.ansible.com/t/ansible-date-and-time-variable/32961 "2020-05-18T16:10:55Z")

</div>

Hi Everyone, I have an ansible playbook which will be used to take AMI snapshot of EC2 instance every month in a year. Now i got a new requirement that snapshot should not be taken for every month and it should for 3 m…

---

## [ansible practices](https://forum.ansible.com/t/ansible-practices/32960)

<div class="topic-metadata">

**Author:** [@Orkhan\_Mammadov](https://forum.ansible.com/u/Orkhan_Mammadov)\
**Replies:** 0\
**Last updated:** [May 18, 2020, 3:23pm UTC](https://forum.ansible.com/t/ansible-practices/32960 "2020-05-18T15:23:55Z")

</div>

Hi guys, I have started to learn Ansible with Sander’s video course, I need more tasks for practices. Can anyone provide me with the trusted source for Ansible tasks? Thanks.

---

## [docker\_container env from file](https://forum.ansible.com/t/docker-container-env-from-file/32888)

<div class="topic-metadata">

**Author:** [@Emanuele](https://forum.ansible.com/u/Emanuele)\
**Replies:** 2\
**Last updated:** [May 18, 2020, 2:48pm UTC](https://forum.ansible.com/t/docker-container-env-from-file/32888 "2020-05-18T14:48:19Z")

</div>

Hi, i’m trying to pass environment variables to my docker with env and populate it with a file. Like this: \` name: deploy container docker\_container: name: test image: debian env: include\_vars: file: workbench.…

---

## [is there a progress bar in TASK?](https://forum.ansible.com/t/is-there-a-progress-bar-in-task/32953)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 5\
**Last updated:** [May 18, 2020, 2:22pm UTC](https://forum.ansible.com/t/is-there-a-progress-bar-in-task/32953 "2020-05-18T14:22:45Z")

</div>

is there a progress bar available in TASK?

---

## [Supporting fuse as a filesystem type in mount module](https://forum.ansible.com/t/supporting-fuse-as-a-filesystem-type-in-mount-module/32959)

<div class="topic-metadata">

**Author:** [@nikobelia](https://forum.ansible.com/u/nikobelia)\
**Replies:** 0\
**Last updated:** [May 18, 2020, 1:23pm UTC](https://forum.ansible.com/t/supporting-fuse-as-a-filesystem-type-in-mount-module/32959 "2020-05-18T13:23:50Z")

</div>

Dear Ansible list, A project I’m working on uses the moderately widely used open source tool s3fs-fuse to mount an AWS S3 bucket as a FUSE filesystem (https://github.com/s3fs-fuse/s3fs-fuse). With s3fs-fuse, you can int…

---

## [Remove items from a variable with reject](https://forum.ansible.com/t/remove-items-from-a-variable-with-reject/32956)

<div class="topic-metadata">

**Author:** [@Kernel\_Panic](https://forum.ansible.com/u/Kernel_Panic)\
**Replies:** 2\
**Last updated:** [May 18, 2020, 12:07am UTC](https://forum.ansible.com/t/remove-items-from-a-variable-with-reject/32956 "2020-05-18T00:07:10Z")

</div>

Hello I want to remove items from a variable using reject filter, I have something like this: vars: myvar: item1 item2 List is the output of a command which contains contains item1, item2 , item3, item4, item5, I w…

---

## [Setting an intial cron job and leaving it alone on later plays](https://forum.ansible.com/t/setting-an-intial-cron-job-and-leaving-it-alone-on-later-plays/32951)

<div class="topic-metadata">

**Author:** [@oloryn](https://forum.ansible.com/u/oloryn)\
**Replies:** 2\
**Last updated:** [May 17, 2020, 11:00pm UTC](https://forum.ansible.com/t/setting-an-intial-cron-job-and-leaving-it-alone-on-later-plays/32951 "2020-05-17T23:00:41Z")

</div>

I've got a playbook for preparing new Drupal websites. It doesn't itself go through the full installation (which is interactive), but preps what is needed to complete the installation - installing drupal code, settin…

---

## [is there a connection plugin to use the libvirt serial console?](https://forum.ansible.com/t/is-there-a-connection-plugin-to-use-the-libvirt-serial-console/32954)

<div class="topic-metadata">

**Author:** [@IaV1](https://forum.ansible.com/u/IaV1)\
**Replies:** 0\
**Last updated:** [May 17, 2020, 5:28pm UTC](https://forum.ansible.com/t/is-there-a-connection-plugin-to-use-the-libvirt-serial-console/32954 "2020-05-17T17:28:35Z")

</div>

I’m in a weird chicken and the egg problem. I can’t/prefer not to use dhcp on my created libvirt networks for provisioning. I need to configure the dhcp VM to provide address to all the other VMs without itself having an…

---

## [Ansible import excel format price list from supplier and export to remote inventory unit how to](https://forum.ansible.com/t/ansible-import-excel-format-price-list-from-supplier-and-export-to-remote-inventory-unit-how-to/32929)

<div class="topic-metadata">

**Author:** [@Michael\_Chan](https://forum.ansible.com/u/Michael_Chan)\
**Replies:** 3\
**Last updated:** [May 17, 2020, 12:29pm UTC](https://forum.ansible.com/t/ansible-import-excel-format-price-list-from-supplier-and-export-to-remote-inventory-unit-how-to/32929 "2020-05-17T12:29:51Z")

</div>

Hi I am not sure if this idea even possible, I want to use Ansible to pull price list from suppliers and remotely send and (copy) into designated inventory (remote servers) these update price lists are in excel and once …

---

## [There appears to be both 'k=v' shorthand syntax and YAML in this task.](https://forum.ansible.com/t/there-appears-to-be-both-k-v-shorthand-syntax-and-yaml-in-this-task/32937)

<div class="topic-metadata">

**Author:** [@Gurudatta\_Nadig](https://forum.ansible.com/u/Gurudatta_Nadig)\
**Replies:** 3\
**Last updated:** [May 16, 2020, 5:04pm UTC](https://forum.ansible.com/t/there-appears-to-be-both-k-v-shorthand-syntax-and-yaml-in-this-task/32937 "2020-05-16T17:04:35Z")

</div>

Good day all, I am new to Ansible, I am getting the following error while running a playbook any pointer ? ansible 2.8.4 There appears to be both ‘k=v’ shorthand syntax and YAML in this task. Only one syntax may be us…

---

## [Task reported as "changed" even if unchanged](https://forum.ansible.com/t/task-reported-as-changed-even-if-unchanged/32949)

<div class="topic-metadata">

**Author:** [@Marc\_Haber](https://forum.ansible.com/u/Marc_Haber)\
**Replies:** 3\
**Last updated:** [May 16, 2020, 10:42am UTC](https://forum.ansible.com/t/task-reported-as-changed-even-if-unchanged/32949 "2020-05-16T10:42:01Z")

</div>

Hi, the following task: - name: configure systemd-timesyncd - check unit active command: argv: - "systemctl" - "is-enabled" - "systemd-timesyncd" check\_mode: no register: systemd\_time…

---

## [Automate Oracle Database Shutdown and Startup with Ansible.](https://forum.ansible.com/t/automate-oracle-database-shutdown-and-startup-with-ansible/32948)

<div class="topic-metadata">

**Author:** [@Akshay\_Bora1](https://forum.ansible.com/u/Akshay_Bora1)\
**Replies:** 8\
**Last updated:** [May 16, 2020, 9:50am UTC](https://forum.ansible.com/t/automate-oracle-database-shutdown-and-startup-with-ansible/32948 "2020-05-16T09:50:45Z")

</div>

Hi Everyone, I am writing an ansible script to automate the task of oracle database shutdown and startup. I am facing a difficulty in reading the environment variables from the XML files. Sample XML File: \[oracle@rac1…

---

## [Unable to run java code with classpath on a remote server](https://forum.ansible.com/t/unable-to-run-java-code-with-classpath-on-a-remote-server/32944)

<div class="topic-metadata">

**Author:** [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Replies:** 1\
**Last updated:** [May 16, 2020, 8:33am UTC](https://forum.ansible.com/t/unable-to-run-java-code-with-classpath-on-a-remote-server/32944 "2020-05-16T08:33:12Z")

</div>

In order to run java code I need to first set the classpath of dependent libraries by running a script setWLSEnv.sh as below: $ . /app/wlserv\*/server/bin/setWLSEnv.sh $ java weblogic.version The output gives me the ver…

---

## [winrm http port 5985](https://forum.ansible.com/t/winrm-http-port-5985/32943)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 3\
**Last updated:** [May 15, 2020, 9:48pm UTC](https://forum.ansible.com/t/winrm-http-port-5985/32943 "2020-05-15T21:48:21Z")

</div>

can winrm communicate via http 5985? my group\[\_vars file ansible\_user: ‘administrator’ ansible\_password: ‘xxxxxx’ ansible\_port: 5985 ansible\_connection: ‘winrm’ ansible\_winrm\_server\_cert\_validation: ‘ignore’ ansib…

---

## [kerberos](https://forum.ansible.com/t/kerberos/32945)

<div class="topic-metadata">

**Author:** [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Replies:** 2\
**Last updated:** [May 15, 2020, 9:46pm UTC](https://forum.ansible.com/t/kerberos/32945 "2020-05-15T21:46:55Z")

</div>

trying to get kerberos to work . I got all the libraries and krb5.conf file setup. I got a ticket from klist but when i do win\_ping I get errors ansible windows -i hosts -m win\_ping 10.50.1.231 | UNREACHABLE! =\> { “c…

---

## [Is there a better way to search through a list using when and regex\_search](https://forum.ansible.com/t/is-there-a-better-way-to-search-through-a-list-using-when-and-regex-search/32916)

<div class="topic-metadata">

**Author:** [@Scott\_Fella](https://forum.ansible.com/u/Scott_Fella)\
**Replies:** 24\
**Last updated:** [May 15, 2020, 9:11pm UTC](https://forum.ansible.com/t/is-there-a-better-way-to-search-through-a-list-using-when-and-regex-search/32916 "2020-05-15T21:11:37Z")

</div>

Still learning Ansible, but getting somewhat better. I’m trying to use a list that I have in a playbook just for ease of testing. Is there a simple way of writing to a file when one of the items in the list is found in t…

---

## [EOS Modules for EOS Code \<= 4.13.15M](https://forum.ansible.com/t/eos-modules-for-eos-code-4-13-15m/32942)

<div class="topic-metadata">

**Author:** [@Kevin\_C](https://forum.ansible.com/u/Kevin_C)\
**Replies:** 0\
**Last updated:** [May 15, 2020, 5:41pm UTC](https://forum.ansible.com/t/eos-modules-for-eos-code-4-13-15m/32942 "2020-05-15T17:41:14Z")

</div>

Hey everyone, I am ripe as a green banana with ansible. I’ve installed 2.9 on Ubuntu and setup a few playbooks for our heterogeneous environment. I’ve had success with all of our EOS devices running \> 4.20 but we have s…

---

## [Ansible vmware\_content\_deploy\_template](https://forum.ansible.com/t/ansible-vmware-content-deploy-template/32941)

<div class="topic-metadata">

**Author:** [@David\_Foley](https://forum.ansible.com/u/David_Foley)\
**Replies:** 1\
**Last updated:** [May 15, 2020, 4:53pm UTC](https://forum.ansible.com/t/ansible-vmware-content-deploy-template/32941 "2020-05-15T16:53:06Z")

</div>

Hi All, I’m getting the Following Error When trying to Run an Ansible Playbook. even when i have validate\_certs Set to False, it’s still displaying the issue. Unverified HTTPS request is being made. Adding certificate …

[Previous page](https://forum.ansible.com/c/archives/ansible-project/30.md?page=123)

[Next page](https://forum.ansible.com/c/archives/ansible-project/30.md?page=125)
