diff --git a/README.md b/README.md index 8b96604..3a793fc 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Sets Fully qualified domain name (FQDN) Requirements ------------ -Ansible version 2.0+ +Ansible version 2.4+ ## Platforms diff --git a/Vagrantfile b/Vagrantfile index 036b903..a9a5f84 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -26,15 +26,15 @@ boxes = [ :ram => "256" }, { - :name => "debian-711", - :box => "bento/debian-7.11", + :name => "debian-12", + :box => "debian/bookworm64", :ip => '10.0.0.14', :cpu => "50", :ram => "256" }, { - :name => "debian-86", - :box => "bento/debian-8.6", + :name => "debian-11", + :box => "debian/bullseye64", :ip => '10.0.0.15', :cpu => "50", :ram => "256" diff --git a/meta/main.yml b/meta/main.yml index 9cd7046..ee6bdb0 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,9 +1,11 @@ --- galaxy_info: + role_name: fqdn + namespace: holms author: Roman Gorodeckij description: Set FQDN and hostname license: MIT - min_ansible_version: 2.0 + min_ansible_version: 2.4 platforms: - name: EL versions: @@ -20,6 +22,4 @@ galaxy_info: categories: - networking - system - -dependencies: [] - + dependencies: {} diff --git a/tasks/main.yml b/tasks/main.yml index bafdd97..c7ce560 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,16 +1,16 @@ --- - name: fqdn | Configure Debian - include: debian.yml + import_tasks: debian.yml when: ansible_os_family == 'Debian' - name: fqdn | Configure Redhat - include: redhat.yml + import_tasks: redhat.yml when: ansible_os_family == 'RedHat' - name: fqdn | Configure Linux - include: linux.yml + import_tasks: linux.yml when: ansible_system in [ 'Linux' ] - name: fqdn | Configure Windows - include: windows.yml + import_tasks: windows.yml when: ansible_system in [ 'Win32NT' ] diff --git a/tests/test.yml b/tests/test.yml index 4fafb8e..f76b35f 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -4,11 +4,11 @@ connection: local become: true pre_tasks: - - include: pre.yml + - import_tasks: pre.yml roles: - ../../ post_tasks: - - include: post.yml + - import_tasks: post.yml vars: hostname: mx fqdn: mx.example.com diff --git a/tests/vagrant.yml b/tests/vagrant.yml index a6609d1..6151d80 100644 --- a/tests/vagrant.yml +++ b/tests/vagrant.yml @@ -4,11 +4,11 @@ remote_user: vagrant become: true pre_tasks: - - include: pre.yml + - import_tasks: pre.yml roles: - ../../ post_tasks: - - include: post.yml + - import_tasks: post.yml vars: hostname: mx fqdn: mx.example.com