Re: [ansible-project] Re: Setting hostname

2015-09-21 Thread stefaans.most...@gmail.com
Thanx mate, figured that one out the hard way! :D

On Mon, Sep 21, 2015 at 7:49 AM, Paul Markham  wrote:

> YAML doesn't use an equals sign, instead use a colon:
>
> ---
>   hostname_name*:* mozzi
>   hostname_domain*:* mozzi.mydomain.com
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/_h-dzqHYejQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/ffafe488-378f-48c4-a77d-b7885f6928fa%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
J Stefaans Mostert
Mobile: 0844634590
Fax: 0867300603
skype: mozzi_za (kuberboef)

Linux is simple. It just takes a genius to understand its simplicity.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CANNCwOVa1B%3Dhx5UARjboXPkB6e_MhY5pP4sRvutqSikxHsx-MA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Setting hostname

2015-09-20 Thread Paul Markham
YAML doesn't use an equals sign, instead use a colon:

---
  hostname_name*:* mozzi
  hostname_domain*:* mozzi.mydomain.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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ffafe488-378f-48c4-a77d-b7885f6928fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Setting hostname

2015-09-15 Thread Frank Perks
Like i said move your ansible-hostname into the roles folder (if you don't 
have one make one). As far as i know ansible only loads roles from the 
roles folder, which is probably your issue.

Also his documentation is wrong, he doesn't use hostname_domain, he 
actually in the code uses hostname_fqdn instead. 

On Tuesday, September 15, 2015 at 1:41:52 AM UTC-4, Kuberboef wrote:
>
>
>
> On Monday, 14 September 2015 18:01:34 UTC+2, Frank Perks wrote:
>>
>> ansible-hostname is a role, and should be in the roles directory.
>>
>> Assuming /home/stefaansm/trusty64/Ansible/ is where your playbooks are. 
>> Then ansible-hostname should be located at 
>> /home/stefaansm/trusty64/Ansible/roles/ansible-hostname
>>
>>
>>
>> On Monday, September 14, 2015 at 8:20:06 AM UTC-4, Kuberboef wrote:
>>>
>>>
>>> Morning all
>>>
>>> I am sure this has been asked before, I just struggle to find it.
>>> I cloned https://github.com/knopki/ansible-hostname
>>> Looks good and vagrant calls ansible successfully and all goes wel, 
>>> untill
>>> I need to specify variables in the vars/main.yml file.
>>>
>>> hostname_name = mozzi
>>> hostname_domain = mozzi.mydomain.com
>>>
>>> My error:
>>> ERROR: vars from 
>>> '/home/stefaansm/trusty64/Ansible/ansible-hostname/vars/main.yml' are not a 
>>> dict
>>>
>>> Now being a nube at this and not a programmers backside, I seem to be 
>>> lost here and doc's seem scarce.
>>>
>>> Mozzi
>>>
>>>
> Morning
>
> Okay contents of  ~/trusty64/Ansible
>  Ansible
> │   ├── ansible-hostname
> │   │   ├── defaults
> │   │   │   └── main.yml
> │   │   ├── LICENSE
> │   │   ├── meta
> │   │   │   └── main.yml
> │   │   ├── README.md
> │   │   ├── tasks
> │   │   │   └── main.yml
> │   │   └── vars
> │   │   └── main.yml
>
> │   └── playbook.yml
>
> config in playbook:
>
> - hosts: all
>   roles:
> - { role: ansible-hostname }
>
> So according to me the role is found and executed correctly, but there is 
> something wrong
> with the way I specify the hostnames in vars/main.yml.
>
> From the README.md:
>
> Role Variables
> --
>
>  * *hostname_name* - new hostname (not FQDN, before first dot)
>  * *hostname_domain* - new domain name
>
> Config in vars/main.yml:
>
> ---
> # vars file for hostname
>   hostname_name = mozzi
>   hostname_domain = mozzi.mydomain.com
>
> Error I get:
>
> ERROR: vars from 
> '/home/stefaansm/trusty64/Ansible/ansible-hostname/vars/main.yml' are not a 
> dict
>
> How do I make this a dict?
>
> Again apologies for such a n00b question.
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c55ece08-0b4a-416d-87df-112b51206bb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Setting hostname

2015-09-14 Thread Frank Perks
ansible-hostname is a role, and should be in the roles directory.

Assuming /home/stefaansm/trusty64/Ansible/ is where your playbooks are. 
Then ansible-hostname should be located at 
/home/stefaansm/trusty64/Ansible/roles/ansible-hostname



On Monday, September 14, 2015 at 8:20:06 AM UTC-4, Kuberboef wrote:
>
>
> Morning all
>
> I am sure this has been asked before, I just struggle to find it.
> I cloned https://github.com/knopki/ansible-hostname
> Looks good and vagrant calls ansible successfully and all goes wel, 
> untill
> I need to specify variables in the vars/main.yml file.
>
> hostname_name = mozzi
> hostname_domain = mozzi.mydomain.com
>
> My error:
> ERROR: vars from 
> '/home/stefaansm/trusty64/Ansible/ansible-hostname/vars/main.yml' are not a 
> dict
>
> Now being a nube at this and not a programmers backside, I seem to be lost 
> here and doc's seem scarce.
>
> Mozzi
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/56ee2a06-9b05-4965-a114-a88a2029c1bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Setting hostname

2015-09-14 Thread Kuberboef


On Monday, 14 September 2015 18:01:34 UTC+2, Frank Perks wrote:
>
> ansible-hostname is a role, and should be in the roles directory.
>
> Assuming /home/stefaansm/trusty64/Ansible/ is where your playbooks are. 
> Then ansible-hostname should be located at 
> /home/stefaansm/trusty64/Ansible/roles/ansible-hostname
>
>
>
> On Monday, September 14, 2015 at 8:20:06 AM UTC-4, Kuberboef wrote:
>>
>>
>> Morning all
>>
>> I am sure this has been asked before, I just struggle to find it.
>> I cloned https://github.com/knopki/ansible-hostname
>> Looks good and vagrant calls ansible successfully and all goes wel, 
>> untill
>> I need to specify variables in the vars/main.yml file.
>>
>> hostname_name = mozzi
>> hostname_domain = mozzi.mydomain.com
>>
>> My error:
>> ERROR: vars from 
>> '/home/stefaansm/trusty64/Ansible/ansible-hostname/vars/main.yml' are not a 
>> dict
>>
>> Now being a nube at this and not a programmers backside, I seem to be 
>> lost here and doc's seem scarce.
>>
>> Mozzi
>>
>>
Morning

Okay contents of  ~/trusty64/Ansible
 Ansible
│   ├── ansible-hostname
│   │   ├── defaults
│   │   │   └── main.yml
│   │   ├── LICENSE
│   │   ├── meta
│   │   │   └── main.yml
│   │   ├── README.md
│   │   ├── tasks
│   │   │   └── main.yml
│   │   └── vars
│   │   └── main.yml

│   └── playbook.yml

config in playbook:

- hosts: all
  roles:
- { role: ansible-hostname }

So according to me the role is found and executed correctly, but there is 
something wrong
with the way I specify the hostnames in vars/main.yml.

>From the README.md:

Role Variables
--

 * *hostname_name* - new hostname (not FQDN, before first dot)
 * *hostname_domain* - new domain name

Config in vars/main.yml:

---
# vars file for hostname
  hostname_name = mozzi
  hostname_domain = mozzi.mydomain.com

Error I get:

ERROR: vars from 
'/home/stefaansm/trusty64/Ansible/ansible-hostname/vars/main.yml' are not a 
dict

How do I make this a dict?

Again apologies for such a n00b question.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7c70c3cf-ecf6-4db2-8d13-1861af7244ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.