diff --git a/devstack/plugin.sh b/devstack/plugin.sh index c7a353c..e2678ec 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -170,12 +170,12 @@ function configure_tobiko_neutron { echo_summary "Write [neutron] section to ${TOBIKO_CONF_FILE}" local tobiko_conf_file=$1 - # Write floating network - local floating_network=${TOBIKO_NEUTRON_FLOATING_NETWORK} - if [ "${floating_network}" != "" ]; then - iniset "${tobiko_conf_file}" neutron floating_network \ - "${floating_network}" - fi + iniset_nonempty "${tobiko_conf_file}" neutron floating_network \ + "${TOBIKO_NEUTRON_FLOATING_NETWORK}" + iniset_nonempty "${tobiko_conf_file}" neutron ipv4_dns_nameservers \ + "${TOBIKO_NEUTRON_IPV4_DNS_NAMESERVERS}" + iniset_nonempty "${tobiko_conf_file}" neutron ipv6_dns_nameservers \ + "${TOBIKO_NEUTRON_IPV6_DNS_NAMESERVERS}" } diff --git a/devstack/settings b/devstack/settings index 4b0ad13..88c3748 100644 --- a/devstack/settings +++ b/devstack/settings @@ -39,3 +39,5 @@ TOBIKO_NOVA_KEY_FILE=${TOBIKO_NOVA_KEY_FILE:-} # --- Neutron settings --- TOBIKO_NEUTRON_FLOATING_NETWORK=${TOBIKO_NEUTRON_FLOATING_NETWORK:-${PUBLIC_NETWORK_NAME}} +TOBIKO_NEUTRON_IPV4_DNS_NAMESERVERS=${TOBIKO_NEUTRON_IPV4_DNS_NAMESERVERS:-} +TOBIKO_NEUTRON_IPV6_DNS_NAMESERVERS=${TOBIKO_NEUTRON_IPV6_DNS_NAMESERVERS:-} diff --git a/playbooks/vagrant/provision.yaml b/playbooks/vagrant/provision.yaml index 6997739..4c5bd67 100644 --- a/playbooks/vagrant/provision.yaml +++ b/playbooks/vagrant/provision.yaml @@ -8,7 +8,7 @@ pre_tasks: - name: copy '{{ resolv_conf_file}}' file - become: yes + become: true copy: src: '{{ resolv_conf_file }}' dest: /etc/resolv.conf @@ -18,9 +18,9 @@ - name: update APT database apt: - update_cache: yes + update_cache: true cache_valid_time: 3600 - become: yes + become: true when: - ansible_os_family == 'Debian' diff --git a/roles/devstack-tobiko-deploy/tasks/check_restack.yaml b/roles/devstack-tobiko-deploy/tasks/check-restack.yaml similarity index 94% rename from roles/devstack-tobiko-deploy/tasks/check_restack.yaml rename to roles/devstack-tobiko-deploy/tasks/check-restack.yaml index cf43b88..9920ded 100644 --- a/roles/devstack-tobiko-deploy/tasks/check_restack.yaml +++ b/roles/devstack-tobiko-deploy/tasks/check-restack.yaml @@ -6,7 +6,7 @@ stat: path: '{{ stack_succeeded_file }}' register: check_devstack_succeeded_file_exists - failed_when: no + failed_when: false - debug: var=check_devstack_succeeded_file_exists @@ -25,7 +25,7 @@ stat: path: '{{ devstack_dir }}/local.conf' register: check_devstack_local_conf_file_exists - failed_when: no + failed_when: false - debug: var=check_devstack_local_conf_file_exists diff --git a/roles/devstack-tobiko-deploy/tasks/deploy-local-conf.yaml b/roles/devstack-tobiko-deploy/tasks/deploy-local-conf.yaml index c943ba3..825debd 100644 --- a/roles/devstack-tobiko-deploy/tasks/deploy-local-conf.yaml +++ b/roles/devstack-tobiko-deploy/tasks/deploy-local-conf.yaml @@ -1,7 +1,7 @@ --- - name: copy local.conf file - become: yes + become: true copy: owner: stack group: stack diff --git a/roles/devstack-tobiko-deploy/tasks/deploy-project.yaml b/roles/devstack-tobiko-deploy/tasks/deploy-project.yaml index 708343c..2bdb575 100644 --- a/roles/devstack-tobiko-deploy/tasks/deploy-project.yaml +++ b/roles/devstack-tobiko-deploy/tasks/deploy-project.yaml @@ -1,7 +1,7 @@ --- - name: "ensure '{{ project_dest_dir }}' exists" - become: yes + become: true become_user: root file: path: '{{ project_dest_dir | realpath }}' @@ -20,21 +20,21 @@ delegate_to: localhost register: check_project_src_dir_exists when: ( project_src_dir | length) > 0 - failed_when: no + failed_when: true -- become: yes +- become: true become_user: stack block: - name: copy '{{ project_src_dir }}' to '{{ project_dest_dir }}' synchronize: - group: no - owner: no + group: false + owner: false src: "{{ project_src_dir | realpath }}/." dest: "{{ project_dest_dir | realpath }}" - use_ssh_args: yes - recursive: yes + use_ssh_args: true + recursive: true rsync_opts: - '--exclude-from={{ project_src_dir | realpath }}/.gitignore' register: copy_project_src_dir diff --git a/roles/devstack-tobiko-deploy/tasks/ensure-stack-user.yaml b/roles/devstack-tobiko-deploy/tasks/ensure-stack-user.yaml index 371a5ea..9e46e15 100644 --- a/roles/devstack-tobiko-deploy/tasks/ensure-stack-user.yaml +++ b/roles/devstack-tobiko-deploy/tasks/ensure-stack-user.yaml @@ -2,14 +2,14 @@ - name: ensure stack group exists - become: yes + become: true group: name: stack state: present - name: ensure stack user exists - become: yes + become: true user: name: stack home: '{{ devstack_dest_dir }}' @@ -19,7 +19,7 @@ - name: ensure stack user has sudo privileges - become: yes + become: true copy: dest: /etc/sudoers.d/stack content: | @@ -27,7 +27,7 @@ - name: ensure stack user home exists - become: yes + become: true become_user: root file: path: '{{ devstack_dest_dir | realpath }}' diff --git a/roles/devstack-tobiko-deploy/tasks/run-stack.yaml b/roles/devstack-tobiko-deploy/tasks/run-stack.yaml index 445d402..0f0bd4f 100644 --- a/roles/devstack-tobiko-deploy/tasks/run-stack.yaml +++ b/roles/devstack-tobiko-deploy/tasks/run-stack.yaml @@ -1,6 +1,6 @@ --- -- include_tasks: check_restack.yaml +- include_tasks: check-restack.yaml - name: run stack.sh become: true diff --git a/roles/devstack-tobiko-deploy/tasks/run-unstack.yaml b/roles/devstack-tobiko-deploy/tasks/run-unstack.yaml index 8b1984d..ca8e3ea 100644 --- a/roles/devstack-tobiko-deploy/tasks/run-unstack.yaml +++ b/roles/devstack-tobiko-deploy/tasks/run-unstack.yaml @@ -1,9 +1,9 @@ --- -- include_tasks: check_restack.yaml +- include_tasks: check-restack.yaml - name: run unstack.sh - become: yes + become: true become_user: stack shell: cmd: | @@ -17,7 +17,7 @@ echo "*** FINISHED ***" exit $rc register: run_unstack - ignore_errors: yes + ignore_errors: true when: force_restack | bool diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 36e97e6..ac017d6 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -40,6 +40,10 @@ standard-attr-revisions,standard-attr-segment, standard-attr-timestamp,standard-attr-tag,subnet_allocation, trunk,trunk-details,uplink-status-propagation + TOBIKO_NEUTRON_IPV4_DNS_NAMESERVERS: + "{{ ipv4_dns_nameservers | join(',') }}" + TOBIKO_NEUTRON_IPV6_DNS_NAMESERVERS: + "{{ ipv6_dns_nameservers | join(',') }}" devstack_plugins: heat: https://opendev.org/openstack/heat.git neutron: https://opendev.org/openstack/neutron.git @@ -81,6 +85,12 @@ $NOVA_CONF: quota: instances: 20 + ipv4_dns_nameservers: + - 1.0.0.1 + - 8.8.8.8 + ipv6_dns_nameservers: + - 2606:4700:4700::1111 + - 2001:4860:4860::8888 zuul_copy_output: '{{ stage_dir }}/stackviz': logs extensions_to_txt: