Thanks dick but now it is complaining clouds is undefined.😔
On Thu, 1 Aug 2019 at 1:50 PM, Dick Visser <[email protected]> wrote:
> Actually, it's this:
>
> cloud: "{{ clouds.mycloud }}"
>
> On Thu, 1 Aug 2019 at 10:03, Rahul Kumar <[email protected]> wrote:
> >
> > sorry to come back Dick. It is still not working from clouds.yaml
> > "msg": "The task includes an option with an undefined variable. The
> error was: 'mycloud' is undefined\n\nThe error appears to be in
> '/root/tas/simpledemo/Main-Playbook.yaml': line 5, column 7, but may\nbe
> elsewhere in the file depending on the exact syntax problem.\n\nThe
> offending line appears to be:\n\n tasks:\n - name: create network\n
> ^ here\n"
> > Though i defined: cloud: "{{ mycloud }}"
> >
> > On Wed, 31 Jul 2019 at 15:34, Rahul Kumar <[email protected]>
> wrote:
> >>
> >> Thanks Dick. It worked, I forgot this by mistake.
> >>
> >> On Wed, 31 Jul 2019 at 14:56, Dick Visser <[email protected]>
> wrote:
> >>>
> >>> You are using the literal string 'cloud'.
> >>> Change that entry in the os_network task to:
> >>>
> >>> cloud: "{{ mycloud }}"
> >>>
> >>> On Wed, 31 Jul 2019 at 09:37, Rahul Kumar <[email protected]>
> wrote:
> >>> >
> >>> > Hi All,
> >>> > I am trying to create Openstack instances using Ansible for
> Openstack.
> >>> > I have clouds.yaml as below:
> >>> > clouds:
> >>> > mycloud:
> >>> > auth:
> >>> > auth_url: https://<host>:<Port>/v3
> >>> > project_name: mycloud
> >>> > username: mycloud
> >>> > project_domain_name: Default
> >>> > user_domain_name: Default
> >>> > password: mycloudpwd
> >>> > region_name: regionOne
> >>> > interface: public
> >>> > identity_api_version:
> >>> > and Main Playbook is as below:
> >>> > ---
> >>> > - name: Create a test environment
> >>> > hosts: localhost
> >>> > tasks:
> >>> > - name: create network
> >>> > os_network:
> >>> > cloud: mycloud
> >>> > state: present
> >>> > name: test-network
> >>> > external: false
> >>> > wait: yes
> >>> > ---------------------
> >>> > ------
> >>> > But i am resulting in error:
> >>> > fatal: [localhost]: FAILED! => {"changed": false, "msg": "Cloud
> mycloud was not found."}.
> >>> > Notice clouds.yaml and Main Playbook is in same location.
> >>> >
> >>> > Thanks
> >>> > Rahul
> >>> >
> >>> > --
> >>> > 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 [email protected].
> >>> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAGH8rEzmMwBjGVa31CA5Ffj60imd_7WQ6MFCm6EUuUP2ve_YEA%40mail.gmail.com
> .
> >>>
> >>>
> >>>
> >>> --
> >>> Dick Visser
> >>> Trust & Identity Service Operations Manager
> >>> GÉANT
> >>>
> >>> --
> >>> 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 [email protected].
> >>> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwNhvjuBwT0nMcYkjs2c9Q3qMqJUw2fD0b4pc7MVhZ%3D3oQ%40mail.gmail.com
> .
> >
> > --
> > 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 [email protected].
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAGH8rExkcQeBUrPBkn2C4dy3sgP3mD6eBYBAL2dWLG69NxySaA%40mail.gmail.com
> .
>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwMv6ssuLaAqXnPKZMY836rF-Ep59W8WExA41-yObHka8Q%40mail.gmail.com
> .
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAGH8rEweyyqF0g4Fhzd%3DrferaTp2H7zhj5%3Dhxa4K9HWYKTf8nA%40mail.gmail.com.