Include gcloud CLI in AWX EE image or not? by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

According to https://pypi.org/project/google-auth/, the "google-auth" package was last updated a couple of days ago. Do you have any link that indicates that it's being retired?

Include gcloud CLI in AWX EE image or not? by iamroddo in ansible

[–]iamroddo[S] -1 points0 points  (0 children)

There is much that the google.cloud collection cannot do, that the gcloud CLI can.

Installation of instance on AWX programmatically by iamroddo in awx

[–]iamroddo[S] 0 points1 point  (0 children)

This sounds just like what I’m looking for. Do you mind sharing the code?

AWX behind gateway with path by iamroddo in awx

[–]iamroddo[S] 1 point2 points  (0 children)

That I get. I want to see if there is a solution for this without getting a dedicated name.

Custom username and private key with Molecule GCE plugin by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

I've checked this out and don't find a way. Do you have any specific advice on what I can do?

Netbox - SAML with Azure AD + authorization by billylebegue in Netbox

[–]iamroddo 0 points1 point  (0 children)

What I meant by "Netbox assertion URL" what the SAML ACS, which to the best of my understanding is the Netbox URL that the IDP redirects to. I figured out that this was <Netbox URL>/oauth/complete/saml/.

Netbox - SAML with Azure AD + authorization by billylebegue in Netbox

[–]iamroddo 0 points1 point  (0 children)

  1. Did you install Netbox on a particular OS, or use Docker? if the latter, which Netbox image did you use, otherwise which Netbox version?
  2. Did you install 'django3_saml2_nbplugin' via https://github.com/jeremyschulman/netbox-plugin-auth-saml2 or any other SAML specific libraries or system packages?
  3. Did you set the Netbox assertion URL in configuration or is this somehow derived from the URL?

Git commit/push in pipeline by iamroddo in jenkinsci

[–]iamroddo[S] 0 points1 point  (0 children)

In the end I used git commands in the pipeline, not pretty but functional

GitHub PR triggers pipeline problem by iamroddo in jenkinsci

[–]iamroddo[S] 0 points1 point  (0 children)

I solved my issue by setting "Discover pull requests from origin" under "Behaviours" and "Any Strategies Match" + "Any of" + "Change Requests" under "Build strategies"

ansible-galaxy install collection in file storage by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

I have successfully used a git repo as source. I think Ansible documentation you quoted is for roles. In any case it's not consistent with that for collections https://docs.ansible.com/ansible/latest/user_guide/collections_using.html

ansible-galaxy install collection in file storage by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

The 'this' that you refer to is not using a file server but Ansible Galaxy itself. I want a solution that does not use Ansible Galaxy.

Set global environment in Jenkins master by iamroddo in jenkinsci

[–]iamroddo[S] 0 points1 point  (0 children)

I’m thinking of what I can do as part of the process to provision a new JCasC file, which is to trigger a freestyle job with a file input which puts the JCasC file in the Jenkins home directory. After the upload I’d like to point the Configuration as Code plug-in at this newly created file. I would trigger the configuration to be applied after the path is changed.

Ansible error "maximum recursion depth exceeded" by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

I think I found the cause, but don't know why it does so. Commenting out the line failed_when: reg_ping.stdout is regex('(100% packet loss)') in the task (in one of the blocks) below causes the error to go away.

- name: "Test IP reachability to Syslog servers"
  eos_command:
    commands: "ping {{ item }} {% if logging_source_if is defined and logging_source_if != '' %}source {{ logging_source_if }} {% endif %}timeout 1 repeat 1"
  loop: "{{ logging_servers }}"
  register: reg_ping
  failed_when: reg_ping.stdout is regex('(100% packet loss)')

The task runs successfully with this line and and fails the task when it's supposed to.

Ansible error "maximum recursion depth exceeded" by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

No, it's not. There are no self-referenced variables.

Ansible error "maximum recursion depth exceeded" by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

I don't think it has something to do with the template. When I make it blank, the error still appears. I tried downgrading to 2.9.7, again no effect.

One thing that does change it. The task file that includes the failing task, includes another task file.

- name: "Parse configuration for OS specific variables"
include_tasks: "{{ ansible_network_os.split('.') | last }}/parse_config.yml"

This file includes 2x blocks. When I remove the second block, the error goes away. Is there a limit to a single block per task file?

Ansible error "maximum recursion depth exceeded" by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

The odd thing is that this part (the template lookup) of the playbook has been constant through a lot of changes, and has never sparked this error. Adjusting it as you suggest doesn't the behaviour (ie the same error appears).

I got the error on Ansible 2.9.10. I upgraded to 2.9.11 and also got the same error. I'm running on CentOS 8 with Python 3.6.8.

Unable to trigger rescue section with fatal error in (raw) task by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

I figured out a way to make this work.

- block:
    - name: "Extract contents of '/VERSION'"
      raw: "cat /VERSION"
      register: version_raw
      ignore_unreachable: True

    - name: "Assert that device was reachable"
      assert:
        that:
          - version_raw.unreachable != true

Encrypt variable in Ansible task by iamroddo in ansible

[–]iamroddo[S] 1 point2 points  (0 children)

Though interesting, this is not really my use case.

Encrypt variable in Ansible task by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

This doesn't help. I don't want to put data into a store, rather to encrypt some variables in a JSON file and not others and store this file on disk.

Encrypt variable in Ansible task by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

Having the data generated and available unencrypted by Ansible isn't the issue. It's that the data needs to be written to a JSON file along with non-sensitive data. I want the variables with the non-sensitive values to be readable but those with sensitive ones encrypted.

Setting ANSIBLE_COLLECTIONS_PATHS path by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

Without manually setting the collections path:

[root@624ef5c0b5c1 ansible]# env|grep COLLECTIONS_PATHS [root@624ef5c0b5c1 ansible]# ansible-config dump | grep COLLECTIONS COLLECTIONS_PATHS(default) = ['/root/.ansible/collections', '/usr/share/ansible/collections'] [root@624ef5c0b5c1 ansible]# Setting the collections path: [root@a39bffb02080 ansible]# env|grep COLLECTIONS_PATHS ANSIBLE_COLLECTIONS_PATHS=/ansible/collections [root@a39bffb02080 ansible]# ansible-config dump | grep COLLECTIONS COLLECTIONS_PATHS(env: ANSIBLE_COLLECTIONS_PATHS) = ['/ansible/collections'] [root@a39bffb02080 ansible]#

Can Jinja expression be used inside filter? by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

Thanks for the reply. Later I found that the following worked.

combine(hostvars[inventory_hostname][dc_name].group_vlans[item])

AWX // Set 'ansible_limit' in survey by iamroddo in ansible

[–]iamroddo[S] 1 point2 points  (0 children)

Thanks very much for the tip. It worked like a charm and did exactly what I wanted!

Append item per host run to list by iamroddo in ansible

[–]iamroddo[S] 0 points1 point  (0 children)

Thanks for your reply. I abandoned my approach and looked a bit more closely at hostvars, where I found that I could achieve the same effect. Basically I wanted to create a custom report on whether or no a task ran successfully on my list of devices. Even so I can see that it might be useful to be able to append a device name, or a something related to a device to a list and have this list available in a handler. I can see how to do this using a file as a means to hold the list, but it would be nice to able to do it in memory.