geerlingguy / ansible-role-varnish

Ansible Role - Varnish HTTP accelerator
https://galaxy.ansible.com/geerlingguy/varnish/
MIT License
80 stars 88 forks source link

page-185-198 Ansible for DevOps #81

Closed sridharan123456 closed 4 years ago

sridharan123456 commented 6 years ago

Following what you have outlined in your book

[root@ansible1 lamp-infrastructure]# tree . ├── configure.yml ├── index.php.j2 ├── inventories ├── playbooks │ ├── db │ │ ├── main.yml │ │ └── vars.yml │ ├── memcached │ │ ├── main.yml │ │ └── vars.yml │ ├── varnish │ │ ├── main.yml │ │ ├── templates │ │ │ └── default.vcl.j2 │ │ └── vars.yml │ └── www │ ├── index.php.j2 │ ├── main.yml │ └── vars.yml ├── provisioners ├── provision.yml └── Vagrantfile 9 directories, 13 files [root@ansible1 lamp-infrastructure]# ansible-playbook configure.yml ERROR! variable files must contain either a dictionary of variables, or a list of dictionaries. Got: firewall_all owed_tcp_ports - "22" - "80" (<class 'ansible.parsing.yaml.objects.AnsibleUnicode'>) [root@ansible1 lamp-infrastructure]#

Testing from Google Cloud Compute instance - ansinble1

geerlingguy commented 6 years ago

@sridharan123456 have you tried using the example straight from the GitHub repository? https://github.com/geerlingguy/ansible-for-devops/tree/master/lamp-infrastructure

I'm guessing the formatting for the allowed tcp ports might be incorrect in your files?

firewall_allowed_tcp_ports:
  - 22
  - 80

That's how it should look.

sridharan123456 commented 6 years ago

firewall_allowed_tcp_ports:

I have given with - "22" and - "80" as per the book.

Let me chek this - firewall_allowed_tcp_ports:

Let me check the github repository.

Thanks Sri

stale[bot] commented 4 years ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] commented 4 years ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.