From 8371ba8b2bcdf42bf49d9470ad84cc6408902c02 Mon Sep 17 00:00:00 2001 From: Sagi Shnaidman Date: Mon, 26 Aug 2019 07:34:34 +0000 Subject: [PATCH] Revert "Create ansible environment variables in profile.d" This reverts commit 1ac27c39eb3bf01c85daba1ddebe108cc47d1c4f. Ansible environment enforcing broke logs collection (as any other task with ansible on this host). It should have "restored" after the job, not unset. Change-Id: I34e1125ccdfa0560bd5688f99d788b20d67f646e --- .../files/tripleo-ansible-env.sh | 29 ------------------- .../roles/tripleo-bootstrap/tasks/main.yml | 9 ------ 2 files changed, 38 deletions(-) delete mode 100644 tripleo_ansible/roles/tripleo-bootstrap/files/tripleo-ansible-env.sh diff --git a/tripleo_ansible/roles/tripleo-bootstrap/files/tripleo-ansible-env.sh b/tripleo_ansible/roles/tripleo-bootstrap/files/tripleo-ansible-env.sh deleted file mode 100644 index a240086f0..000000000 --- a/tripleo_ansible/roles/tripleo-bootstrap/files/tripleo-ansible-env.sh +++ /dev/null @@ -1,29 +0,0 @@ -function set-ansible-env { - export ANSIBLE_RETRY_FILES_ENABLED=False - export ANSIBLE_ACTION_PLUGINS="${HOME}/.ansible/plugins/action:/usr/share/ansible/plugins/action:/usr/share/ansible/tripleo-plugins/action:/usr/share/openstack-tripleo-validations/action" - export ANSIBLE_CALLBACK_PLUGINS="${HOME}/.ansible/plugins/callback:/usr/share/ansible/plugins/callback:/usr/share/ansible/tripleo-plugins/callback:/usr/share/openstack-tripleo-validations/callback" - export ANSIBLE_FILTER_PLUGINS="${HOME}/.ansible/plugins/filter:/usr/share/ansible/plugins/filter:/usr/share/ansible/tripleo-plugins/filter:/usr/share/openstack-tripleo-validations/filter" - export ANSIBLE_LIBRARY="${HOME}/.ansible/plugins/modules:/usr/share/ansible/plugins/modules:/usr/share/ansible/tripleo-plugins/modules:/usr/share/openstack-tripleo-validations/modules" - export ANSIBLE_MODULE_UTILS="${HOME}/.ansible/plugins/module_utils:/usr/share/ansible/plugins/module_utils:/usr/share/ansible/tripleo-plugins/module_utils:/usr/share/openstack-tripleo-validations/module_utils" - export ANSIBLE_ROLES_PATH="${HOME}/.ansible/roles:/usr/share/ansible/tripleo-roles:/usr/share/ansible/roles:/etc/ansible/roles:/usr/share/openstack-tripleo-validations/roles" - export ANSIBLE_LOOKUP_PLUGINS="${HOME}/.ansible/plugins/lookup:/usr/share/ansible/plugins/lookup:/usr/share/ansible/tripleo-plugins/lookup:/usr/share/openstack-tripleo-validations/lookup" - export ANSIBLE_LOAD_CALLBACK_PLUGINS=True - export ANSIBLE_HOST_KEY_CHECKING=False - export ANSIBLE_LOG_PATH="${HOME}/.ansible/logs/ansible-$(date +"%Y-%m-%dT%H").log" - export ANSIBLE_FORKS=25 - export ANSIBLE_TIMEOUT=30 - export ANSIBLE_GATHER_TIMEOUT=30 - export ANSIBLE_SSH_ARGS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ControlMaster=auto -o ControlPersist=30m -o ServerAliveInterval=5 -o ServerAliveCountMax=5" - export ANSIBLE_PIPELINING=True - export ANSIBLE_SSH_RETRIES=8 -} - -function unset-ansible-env { - for i in $(env | grep ANSIBLE_ | awk -F'=' '{print $1}'); do - unset ${i} - done - echo -e "\nAnsible environment deactivated." - echo -e "To re-activate the environment, run 'set-ansible-env'.\n" -} - -set-ansible-env diff --git a/tripleo_ansible/roles/tripleo-bootstrap/tasks/main.yml b/tripleo_ansible/roles/tripleo-bootstrap/tasks/main.yml index e2b5067d8..efa0dc036 100644 --- a/tripleo_ansible/roles/tripleo-bootstrap/tasks/main.yml +++ b/tripleo_ansible/roles/tripleo-bootstrap/tasks/main.yml @@ -32,15 +32,6 @@ tags: - always -- name: Create tripleo-ansible-env file - become: true - copy: - src: "tripleo-ansible-env.sh" - dest: "/etc/profile.d/tripleo-ansible-env.sh" - owner: "root" - group: "root" - mode: "0755" - - name: Deploy required packages to bootstrap TripleO become: true package: