Skip to content

Commit

Permalink
Merge pull request ANXS#17 from ANXS/otakup0pe/freshen
Browse files Browse the repository at this point in the history
update for fresh ansible
  • Loading branch information
otakup0pe authored Nov 12, 2018
2 parents b4e2a19 + 688aa16 commit 7cb705d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ python: "2.7"
env:
matrix:
- ANSIBLE_VERSION="2.4.2.0"
- ANSIBLE_VERSION="2.4.6"
- ANSIBLE_VERSION="2.7"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq python-apt python-pycurl
Expand All @@ -19,3 +19,5 @@ script:
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## ANXS - hostname [![Build Status](https://travis-ci.org/ANXS/hostname.png)](https://travis-ci.org/ANXS/hostname)
## ANXS - hostname [![Build Status](https://travis-ci.com/ANXS/hostname.png)](https://travis-ci.com/ANXS/hostname)

Ansible role that sets the hostname and FQDN of the node.

Expand Down
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# file: hostname/defaults/main.yml
---

hostname_avahi: no
hostname_avahi: no
12 changes: 5 additions & 7 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# file: hostname/meta/main.yml

---
galaxy_info:
author: pjan vandaele
company: ANXS
description: sets the hostname and FQDN
min_ansible_version: 2.4.2.0
license: MIT
platforms:
- name: Ubuntu
versions:
- all
- name: Ubuntu
versions:
- all
categories:
- system
- system

dependencies:
- role: ANXS.apt
when: hostname_avahi|lower == "true"
10 changes: 5 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# file: hostname/tasks/main.yml

---
- name: Hostname | Ensure dbus installed
apt:
name: "{{item}}"
name: "{{anxs_hostname_packages}}"
state: installed
tags: hostname
with_items: "{{anxs_hostname_packages}}"
when: ansible_os_family == "Debian"

- name: Hostname | Update the hostname (pt. 1) - hostname cmd
Expand Down Expand Up @@ -35,5 +33,7 @@
state: present

- name: Hostname | Install MDNS Components
apt: pkg=avahi-daemon,libnss-mdns state=latest
apt:
name: "{{anxs_hostname_mdns_packages}}"
state: installed
when: 'ansible_os_family == "Debian" and hostname_avahi'
8 changes: 6 additions & 2 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
anxs_hostname_packages:
- dbus
- policykit-1
- dbus
- policykit-1
anxs_hostname_mdns_packages:
- avahi-daemon
- libnss-mdns

0 comments on commit 7cb705d

Please sign in to comment.