diff --git a/roles/network/tasks/detected_network.yml b/roles/network/tasks/detected_network.yml index 4f4bde631..520efc8b9 100644 --- a/roles/network/tasks/detected_network.yml +++ b/roles/network/tasks/detected_network.yml @@ -19,14 +19,9 @@ include_tasks: detected_redhat.yml when: is_redhat -- name: Check to see if dhcpcd is installed and active - Can Fail - shell: systemctl is-enabled dhcpcd - register: dhcpcd_test - ignore_errors: True - - name: Setting dhcpcd_test results set_fact: - dhcpcd_result: "{{ dhcpcd_test.stdout }}" + dhcpcd_result: '{{ ansible_local.local_facts.dhcpcd }}' - name: Check /etc/network/interfaces for gateway shell: grep {{ device_gw }} /etc/network/interfaces | wc -l diff --git a/roles/postgresql/tasks/main.yml b/roles/postgresql/tasks/main.yml index 7574c2fc9..e1b3a1ccc 100644 --- a/roles/postgresql/tasks/main.yml +++ b/roles/postgresql/tasks/main.yml @@ -44,12 +44,7 @@ - name: Initialize the postgres db command: su - postgres -c "/usr/lib/postgresql/{{ postgresql_version }}/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-iiab" creates=/library/pgsql-iiab/pg_hba.conf - when: is_debian - -- name: Initialize the postgres db - command: su - postgres -c "/usr/lib/postgresql/9.5/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-iiab" - creates=/library/pgsql-iiab/pg_hba.conf - when: is_ubuntu + when: is_debuntu - name: Initialize the postgres db command: su - postgres -c "/usr/bin/initdb -E 'UTF-8' --lc-collate={{ postgresql_locale }} --lc-ctype={{ postgresql_locale }} -D /library/pgsql-iiab" @@ -80,8 +75,8 @@ enabled=yes when: postgresql_enabled -- name: Stop and disable postgresql service if not postgresql_enabled - service: name=postgresql +- name: Stop and disable postgresql-iiab service if not postgresql_enabled + service: name=postgresql-iiab state=stopped enabled=no when: not postgresql_enabled diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 54863bcd7..67c274826 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -5,6 +5,7 @@ VERSION_ID=`grep VERSION_ID /etc/*elease | cut -d= -f2` VERSION_ID=${VERSION_ID//\"/} VERSION_ID=${VERSION_ID%%.*} OS_VER=$OS-$VERSION_ID +DHCPCD=`which dhcpcd` case $OS_VER in "fedora-18" | \ @@ -12,6 +13,7 @@ case $OS_VER in "debian-8" | \ "debian-9" | \ "ubuntu-16" | \ +"ubuntu-17" | \ "centos-7" | \ "raspbian-8"| \ "raspbian-9") @@ -45,7 +47,6 @@ fi # interruptions return last stage number recorded (1-9) if [ -f /etc/iiab/iiab.env ] then - STAGE=1 source /etc/iiab/iiab.env STAGE=$STAGE else @@ -55,10 +56,11 @@ ANSIBLE_VERSION=$(ansible --version|head -n 1|cut -f 2 -d " ") cat <