Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
Pushing changes to git submodules made by AWX?
Post Body

Hello all, I'm trying to figure out a solution. Here is the scope of the project.

My ansible role uses a series of user.yml files stored in multiple submodules to create/update users in Azure AD. When it creates a user, it will update the user.yml file, add, commit, then push the changes back to the submodules repo under a new branch, triggering a pipeline to create a merge request for review. All of this is working as intended when I run it from my local machine, but for production it will be running in AWX. The problem I'm getting is the git metadata doesn't seem to move over from the AWX instance into the AWX_RUNNER instance where the code actually runs. Does anyone have any ideas how I can get this sorted? I'm at my wit's end.

# update_submodules.yml
---
- name: Find all users submodules
  find:
    paths: "users/"
    file_type: directory
  register: submodules

- name: Update users submodules
  ansible.builtin.include_tasks: _update_submodule.yml
  loop: "{{ submodules.files }}"
  loop_control:
    loop_var: submodule

# _update_submodule.yml
---
- name: Gather date/time
  ansible.builtin.setup:
    filter: ansible_date_time

- name: Set git branch name
  ansible.builtin.set_fact:
    branch_name: "ansible-{{ ansible_date_time.iso8601_basic_short }}"

- name: Update client submodule
  ansible.builtin.shell:
    chdir: "{{ submodule.path }}"
    cmd: "git checkout -b {{ branch_name }} && git add . && git commit -m 'ANSIBLE AUTOMATED UPDATES: Adding object_id field for new users created by Ansible' && git push origin HEAD:{{ branch_name }} || true"

Author
Account Strength
50%
Account Age
2 years
Verified Email
Yes
Verified Flair
No
Total Karma
113
Link Karma
33
Comment Karma
80
Profile updated: 16 hours ago
Posts updated: 1 month ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago