File tree Expand file tree Collapse file tree 4 files changed +87
-1
lines changed
satellite/roles/client-scripts/files
run-2022-10-19T18:41:14+00:00 Expand file tree Collapse file tree 4 files changed +87
-1
lines changed Original file line number Diff line number Diff line change 8282 TZ: UTC # make sure returned times are in UTC
8383 register: reg
8484
85+ - name: Upload yggdrasild configuration file (if rex_mode == 'mqtt')
86+ ansible.builtin.copy:
87+ dest: /etc/yggdrasil/config.toml
88+ content: |
89+ # yggdrasil global configuration settings written by katello-pull-transport-migrate
90+ broker = ["mqtts://{{ server }}:1883"]
91+ cert-file = "/etc/pki/consumer/cert.pem"
92+ key-file = "/etc/pki/consumer/key.pem"
93+ ca-root = ["/etc/rhsm/ca/katello-server-ca.pem"]
94+ log-level = "error"
95+ when: "rex_mode == 'mqtt'"
96+
97+ - name: Restart yggdrasild service unit (if rex_mode == 'mqtt')
98+ ansible.builtin.systemd:
99+ name: yggdrasild
100+ state: restarted
101+ when: "rex_mode == 'mqtt'"
102+
85103 - name: "Register - output"
86104 debug:
87105 msg:
Original file line number Diff line number Diff line change 7272 &> "{{ clients_yaml_cmd_log }}"
7373 register : clients_yaml_cmd
7474 ignore_errors : true
75- when : " method == 'clients.yaml'"
75+ when :
76+ - method == 'clients.yaml'
77+ - hostvars[groups['satellite6']|first].rex_mode is not defined or hostvars[groups['satellite6']|first].rex_mode == 'ssh'
78+
79+ - name : " Run clients.yaml (log = {{ clients_yaml_cmd_log }})"
80+ shell : |
81+ ansible-playbook \
82+ --private-key /root/id_rsa_key \
83+ --forks "{{ size }}" \
84+ -i clients.ini \
85+ -e "server={{ groups['satellite6']|first }}" \
86+ -e "activationkey='ActivationKey'" \
87+ -e "organization='{{ sat_orglabel }}'" \
88+ -e "config_server_server_timeout='{{ config_server_server_timeout|default('') }}'" \
89+ -e "rex_mode='mqtt'" \
90+ clients.yaml \
91+ &> "{{ clients_yaml_cmd_log }}"
92+ register : clients_yaml_cmd
93+ ignore_errors : true
94+ when :
95+ - method == 'clients.yaml'
96+ - hostvars[groups['satellite6']|first].rex_mode is defined and hostvars[groups['satellite6']|first].rex_mode == 'mqtt'
7697
7798 - name : " Run clients-register.yaml (log = {{ clients_yaml_cmd_log }})"
7899 shell : |
You can’t perform that action at this time.
0 commit comments