viccross / ansible-playbooks

My collection of Ansible playbooks for various tasks (dominated by Openshift, currently)
Apache License 2.0
2 stars 3 forks source link

Preserve the log file from a prior `ocp-ansible.sh` run #127

Open viccross opened 1 year ago

viccross commented 1 year ago

In the case of a retry, when the new Ansible run is started the old log file is removed. If someone attempts a cluster rebuild "over the top" of an existing build, the reason they attempted the prior build is lost. Let's change the process so that the log file is date/time sensitive and "rotated" when a new attempt is generated.

Possibly corollary to this should be the return of the lockout of the automation to prevent multiple or simultaneous build runs.

viccross commented 1 year ago

Possible implementation: the actual log file is created with a timestamp, and /var/www/html/logfile.txt is a symlink to that file. When a new attempt is started, the symlink is updated.

viccross commented 1 year ago

Consider also relating it to the name of the cluster, for when/if named cluster support comes along.

viccross commented 1 year ago

New plan: a userid created for each cluster. This userid will have all the content for that given cluster: install-config.yaml, logfile(s), links to corresponding OpenShift clients, etc.