Skip to content

Commit

Permalink
Aesthetics & fix Ansible version 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pjan committed Mar 11, 2014
1 parent f265aef commit 05c71d1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq python-apt python-pycurl
install:
- pip install ansible
- pip install ansible==1.5.0
script:
- echo localhost > inventory
- ansible-playbook --syntax-check -i inventory test.yml
Expand Down
24 changes: 12 additions & 12 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

- name: Hostname | Update the hostname (pt. 1) - hostname cmd
hostname:
name={{ hostname_name }}
name: "{{hostname_name}}"

- name: Hostname | Update the hostname (pt. 2) - (/etc/hostname)
template:
src=etc_hostname.j2
dest=/etc/hostname
owner=root
group=root
mode=064
src: etc_hostname.j2
dest: /etc/hostname
owner: root
group: root
mode: 0644

- name: Hostname | Update the hostname (pt. 3) - (/etc/hosts)
lineinfile:
dest=/etc/hosts
regexp="^127.0.0.1 {{ hostname_fqdn }} {{ hostname_name }}"
line="127.0.0.1 {{ hostname_fqdn }} {{ hostname_name }}"
state=present
backup=yes
backrefs=yes
dest: /etc/hosts
regexp: "^127.0.0.1 {{ hostname_fqdn }} {{ hostname_name }}"
line: "127.0.0.1 {{ hostname_fqdn }} {{ hostname_name }}"
state: present
backup: yes
backrefs: yes
2 changes: 1 addition & 1 deletion templates/etc_hostname.j2
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ hostname_name }}
{{hostname_name}}

0 comments on commit 05c71d1

Please sign in to comment.